From c79aa82f5591ebedf34cd381f69d370d1cc2d8d1 Mon Sep 17 00:00:00 2001 From: jmontoya Date: Wed, 21 May 2014 09:39:35 +0200 Subject: [PATCH] Updating configuration files. --- app/AppKernel.php | 11 +- app/config/config.yml | 38 +++++- app/config/parameters.php | 3 - app/config/parameters.yml | 14 --- app/config/parameters.yml.dist | 17 ++- app/config/security.yml | 4 +- config/.htaccess | 1 - config/auth.conf.dist.php | 114 ------------------ ...ration.dist.php => configuration.php.dist} | 12 +- config/events.conf.dist.php | 66 ---------- config/mail.conf.dist.php | 16 --- config/portfolio.conf.dist.php | 19 --- config/profile.conf.dist.php | 42 ------- 13 files changed, 63 insertions(+), 294 deletions(-) delete mode 100644 app/config/parameters.php delete mode 100644 app/config/parameters.yml delete mode 100755 config/.htaccess delete mode 100644 config/auth.conf.dist.php rename config/{configuration.dist.php => configuration.php.dist} (90%) delete mode 100644 config/events.conf.dist.php delete mode 100644 config/mail.conf.dist.php delete mode 100644 config/portfolio.conf.dist.php delete mode 100644 config/profile.conf.dist.php diff --git a/app/AppKernel.php b/app/AppKernel.php index 2b7a067576..257aba741c 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -17,10 +17,16 @@ class AppKernel extends Kernel new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), + new ChamiloLMS\CoreBundle\ChamiloLMSCoreBundle(), + + new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(), + new Knp\Bundle\MenuBundle\KnpMenuBundle(), // Vendor specifics bundles new Sonata\CoreBundle\SonataCoreBundle(), new Sonata\BlockBundle\SonataBlockBundle(), + new Sonata\MediaBundle\SonataMediaBundle(), + new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { @@ -29,9 +35,6 @@ class AppKernel extends Kernel $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } - $bundles[] = new ChamiloLMS\CoreBundle\ChamiloLMSCoreBundle(); - $bundles[] = new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(); - return $bundles; } @@ -50,7 +53,7 @@ class AppKernel extends Kernel return $this->rootDir.'/../data/temp/'.$this->environment.'/cache/'; } - // Custom + // Custom paths public function getRealRootDir() { diff --git a/app/config/config.yml b/app/config/config.yml index e579c8f322..467bd4b0d5 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -1,7 +1,6 @@ imports: - { resource: parameters.yml } - { resource: security.yml } - - { resource: parameters.php } framework: #esi: ~ @@ -31,6 +30,7 @@ twig: strict_variables: "%kernel.debug%" paths: "%kernel.root_dir%/../src/ChamiloLMS/CoreBundle/Resources/views/default": template_style + globals: show_toolbar: true @@ -132,8 +132,44 @@ sonata_block: #sonata.media.block.gallery: #sonata.media.block.feature_media: +sonata_media: + # if you don't use default namespace configuration + #class: + # media: MyVendor\MediaBundle\Entity\Media + # gallery: MyVendor\MediaBundle\Entity\Gallery + # gallery_has_media: MyVendor\MediaBundle\Entity\GalleryHasMedia + default_context: default + db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr + contexts: + default: # the default context is mandatory + providers: + - sonata.media.provider.dailymotion + - sonata.media.provider.youtube + - sonata.media.provider.image + - sonata.media.provider.file + + formats: + small: { width: 100 , quality: 70} + big: { width: 500 , quality: 70} + + cdn: + server: + path: /uploads/media # http://media.sonata-project.org/ + + filesystem: + local: + directory: %kernel.root_dir%/../web/uploads/media + create: false + knp_menu: twig: # use "twig: false" to disable the Twig extension and the TwigRenderer template: knp_menu.html.twig templating: false # if true, enables the helper for PHP templates default_renderer: twig # The renderer to use, list is also available by default + +chamilo: + system_version: 10.0.0 + system_stable: false + software_name: chamilo + software_url: http://www.chamilo.org/ + platform_charset: utf-8 \ No newline at end of file diff --git a/app/config/parameters.php b/app/config/parameters.php deleted file mode 100644 index 662f7a08b9..0000000000 --- a/app/config/parameters.php +++ /dev/null @@ -1,3 +0,0 @@ -setParameter('configuration', $_configuration); diff --git a/app/config/parameters.yml b/app/config/parameters.yml deleted file mode 100644 index 2e0a41010d..0000000000 --- a/app/config/parameters.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This file is auto-generated during the composer install -parameters: - database_driver: pdo_mysql - database_host: 127.0.0.1 - database_port: null - database_name: chamilo10 - database_user: root - database_password: root - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: null - mailer_password: null - locale: es - secret: ThisTokenIsNotSoSecretChangeIt diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 8b317c27d2..0e74c0fa64 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -2,9 +2,9 @@ parameters: database_driver: pdo_mysql database_host: 127.0.0.1 database_port: ~ - database_name: symfony + database_name: chamilo10 database_user: root - database_password: ~ + database_password: root mailer_transport: smtp mailer_host: 127.0.0.1 @@ -13,3 +13,16 @@ parameters: locale: en secret: ThisTokenIsNotSoSecretChangeIt + + path.data: ~ + path.temp: ~ + path.courses: ~ + path.logs: ~ + + session_lifetime: ~ + security_key: ~ + password_encryption: sha1 + deny_delete_users: false + login_as_forbidden_globally: false + name_order_conventions: + diff --git a/app/config/security.yml b/app/config/security.yml index 0f8f13a8fb..bac611d80d 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -1,9 +1,9 @@ security: encoders: ChamiloLMS\CoreBundle\Entity\User: - algorithm: sha1 + algorithm: %password_encryption% encode_as_base64: false - iterations: 1 + iterations: 1 role_hierarchy: ROLE_GLOBAL_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] diff --git a/config/.htaccess b/config/.htaccess deleted file mode 100755 index 3418e55a68..0000000000 --- a/config/.htaccess +++ /dev/null @@ -1 +0,0 @@ -deny from all \ No newline at end of file diff --git a/config/auth.conf.dist.php b/config/auth.conf.dist.php deleted file mode 100644 index ffed01465e..0000000000 --- a/config/auth.conf.dist.php +++ /dev/null @@ -1,114 +0,0 @@ - 'APPID', - 'secret' => 'secret app', - 'return_url' => api_get_path(WEB_PATH).'?action=fbconnect' -); -*/ - - -/** - * Shibboleth - */ - -// $shibb_login = ...; - -/** - * LDAP - */ - - - -/** - * Array of connection parameters - **/ -$extldap_config = array( - //base dommain string - 'base_dn' => 'DC=cblue,DC=be', - //admin distinguished name - 'admin_dn' => 'CN=admin,dc=cblue,dc=be', - //admin password - 'admin_password' => 'pass', - //ldap host - 'host' => array('1.2.3.4', '2.3.4.5', '3.4.5.6'), - // filter -// 'filter' => '', // no () arround the string - //'port' => , default on 389 - //protocl version (2 or 3) - 'protocol_version' => 3, - // set this to 0 to connect to AD server - 'referrals' => 0, - //String used to search the user in ldap. %username will ber replaced by the username. - //See extldap_get_user_search_string() function below -// 'user_search' => 'sAMAccountName=%username%', // no () arround the string - 'user_search' => 'uid=%username%', // no () arround the string - //encoding used in ldap (most common are UTF-8 and ISO-8859-1 - 'encoding' => 'UTF-8', - //Set to true if user info have to be update at each login - 'update_userinfo' => true -); - - - -/** - * Correspondance array between chamilo user info and ldap user info - * This array is of this form : - * ' => - * - * If is "func", then the value of will be the return value of the function - * extldap_get_($ldap_array) - * In this cas you will have to declare the extldap_get_ function - * - * If is a string beginning with "!", then the value will be this string without "!" - * - * If is any other string then the value of will be - * $ldap_array[][0] - * - * If is an array then its value will be an array of values with the same rules as above - * - **/ -$extldap_user_correspondance = array( - 'firstname' => 'givenName', - 'lastname' => 'sn', - 'status' => 'func', - 'admin' => 'func', - 'email' => 'mail', - 'auth_source' => '!extldap', - //'username' => , - 'language' => '!english', - 'password' => '!PLACEHOLDER', - 'extra' => array( - 'title' => 'title', - 'globalid' => 'employeeID', - 'department' => 'department', - 'country' => 'co', - 'bu' => 'Company') -); - -/** - * OpenID - */ - -$langMainInfo = 'You may login to this site using an OpenID. You may add your OpenId URLs below, and also see a list of any OpenIDs which have already been added.'; -$langMainInfoDetail = '

OpenID is a secure way to use one user ID and password to log in to many web sites without special software, giving the same password to each site, or losing control over which information is shared with each site that you visit.

'; -$langMainInfoDetail .= '

Users can create accounts using their OpenID, assign one or more OpenIDs to an existing account, and log in using an OpenID. This lowers the barrier to registration, which is good for the site, and offers convenience and security to the users. Logging in via OpenID is far more secure than cross-site logins using drupal.module.

'; -$langMainInfoDetail .= '

More information on OpenID is available at OpenID.net

'; - -/** - * CAS - */ -//$cas = ...; diff --git a/config/configuration.dist.php b/config/configuration.php.dist similarity index 90% rename from config/configuration.dist.php rename to config/configuration.php.dist index 26df2b7ba2..31ed9802e6 100644 --- a/config/configuration.dist.php +++ b/config/configuration.php.dist @@ -1,5 +1,5 @@ array( // key for "user registration" event - 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired - 'event_send_mail' // don't forget to actually write this function in the events.lib.php file - ), - 'self_sent' => false, // this key states that we can't add user to this event through the admin panel - 'name_lang_var' => 'PortalHomepageEdited', - 'desc_lang_var' => 'PortalHomepageEdited', - 'available_keyvars' => array (// keys used for the mail template - 'url' => 'portal', - 'sitename' => 'sitename', - 'firstname' => 'firstname', - 'lastname' => 'lastname', - 'username' => 'username', - 'usermail' => 'usermail', - 'password' => 'password', - 'user_lang' => 'language', - 'admin_name' => 'administrator_name', - 'admin_surname' => 'administrator_surname', - 'admin_phone' => 'administrator_phone', - 'admin_email' => 'administrator_email', - ) - ), - 'user_registration' => array( // key for "user registration" event - 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired - 'event_send_mail' // don't forget to actually write this function in the events.lib.php file - ), - 'self_sent' => true, // this key states that we can't add user to this event through the admin panel - 'name_lang_var' => 'UserRegistrationTitle', - 'desc_lang_var' => 'UserRegistrationComment', - 'available_keyvars' => array (// keys used for the mail template - 'url' => 'portal', - 'sitename' => 'sitename', - 'firstname' => 'firstname', - 'lastname' => 'lastname', - 'username' => 'username', - 'usermail' => 'usermail', - 'password' => 'password', - 'user_lang' => 'language', - 'admin_name' => 'administrator_name', - 'admin_surname' => 'administrator_surname', - 'admin_phone' => 'administrator_phone', - 'admin_email' => 'administrator_email', - ) - ), -); - - -//@include 'events.conf.local.php'; diff --git a/config/mail.conf.dist.php b/config/mail.conf.dist.php deleted file mode 100644 index 0c9cdf953f..0000000000 --- a/config/mail.conf.dist.php +++ /dev/null @@ -1,16 +0,0 @@ -set_title(get_lang('Download')); -//$portfolios[] = $download_portfolio; \ No newline at end of file diff --git a/config/profile.conf.dist.php b/config/profile.conf.dist.php deleted file mode 100644 index a837640af2..0000000000 --- a/config/profile.conf.dist.php +++ /dev/null @@ -1,42 +0,0 @@ - the new image have the name of previous. - // false -> a new name is build for each upladed image. -define('KEEP_THE_OLD_IMAGE_AFTER_CHANGE', true); - // true -> if KEEP_THE_NAME_WHEN_CHANGE_IMAGE is true, the previous image is rename before. - // false -> only the last image still on server. - -// Official code -// Don't forget to change name of offical code in your organization -// See $langOfficialCode within the language file 'registration' -define('CONFVAL_ASK_FOR_OFFICIAL_CODE', true); // not used but name fixed -define('CONFVAL_CHECK_OFFICIAL_CODE', false); -/* if CONFVAL_CHECK_OFFICIAL_CODE is true, build here the -function personal_check_official_code($code, $valueToReturnIfOk, $valueToReturnIfBad) { - return $stateOfficialCode = true; -} -*/ - -// For stats -define('NB_LINE_OF_EVENTS', 15); -