diff --git a/config/configuration.dist.php b/config/configuration.dist.php index 4852a5c47d..a5f8c0dae0 100644 --- a/config/configuration.dist.php +++ b/config/configuration.dist.php @@ -27,14 +27,13 @@ */ // Host $_configuration['db_host'] = '{DATABASE_HOST}'; -// username +// Username $_configuration['db_user'] = '{DATABASE_USER}'; -// password +// Password $_configuration['db_password'] = '{DATABASE_PASSWORD}'; - +// Driver $_configuration['db_driver'] = '{DATABASE_DRIVER}'; - -// chamilo database +// Database name $_configuration['main_database'] = '{DATABASE_MAIN}'; /** Directory settings */ @@ -145,11 +144,11 @@ $_configuration['login_as_forbidden_globally'] = false; //$_configuration['multiple_access_urls'] = true; /** Chamilo version settings */ +$_configuration['system_version'] = '{NEW_VERSION}'; +$_configuration['system_stable'] = NEW_VERSION_STABLE; $_configuration['software_name'] = 'Chamilo'; $_configuration['software_url'] = 'http://www.chamilo.org/'; +/** Chamilo dev settings */ $_configuration['debug'] = false; - -// Version settings -$_configuration['system_version'] = '{NEW_VERSION}'; -$_configuration['system_stable'] = NEW_VERSION_STABLE; +$_configuration['show_profiler'] = false; diff --git a/main/inc/global.inc.php b/main/inc/global.inc.php index 3342cfa0bc..e49ec55909 100644 --- a/main/inc/global.inc.php +++ b/main/inc/global.inc.php @@ -168,9 +168,10 @@ $app['languages_file'] = array(); $app['installed'] = $alreadyInstalled; $app['app.theme'] = 'chamilo'; -// Debug now relies in the configuration.php file +// Developer options relies in the configuration.php file $app['debug'] = isset($_configuration['debug']) ? $_configuration['debug'] : false; +$app['show_profiler'] = isset($_configuration['show_profiler']) ? $_configuration['show_profiler'] : false; // Loading $app settings depending of the debug option if ($app['debug']) { diff --git a/main/inc/services.php b/main/inc/services.php index 9816368a31..2a488e7efc 100644 --- a/main/inc/services.php +++ b/main/inc/services.php @@ -298,19 +298,16 @@ $app['twig'] = $app->share( // Developer tools if (is_writable($app['sys_temp_path'])) { - if ($app['debug']) { + if ($app['debug'] && $app['show_profiler']) { // Adding symfony2 web profiler (memory, time, logs, etc) - //if (api_get_setting('allow_web_profiler') == 'true') { - $app->register( - $p = new Silex\Provider\WebProfilerServiceProvider(), - array( - 'profiler.cache_dir' => $app['profiler.cache_dir'], - ) - ); - $app->mount('/_profiler', $p); - //} + $app->register( + $p = new Silex\Provider\WebProfilerServiceProvider(), + array( + 'profiler.cache_dir' => $app['profiler.cache_dir'], + ) + ); + $app->mount('/_profiler', $p); $app->register(new Whoops\Provider\Silex\WhoopsServiceProvider); - //} } } diff --git a/src/ChamiloLMS/Migrations/Version10.php b/src/ChamiloLMS/Migrations/Version10.php index 580589ab37..95064bae3e 100755 --- a/src/ChamiloLMS/Migrations/Version10.php +++ b/src/ChamiloLMS/Migrations/Version10.php @@ -17,13 +17,13 @@ class Version10 extends AbstractMigration */ public function up(Schema $schema) { - $this->addSql("UPDATE settings_current SET selected_value = '1.10.0.doc' WHERE variable = 'chamilo_database_version'"); + $this->addSql("UPDATE settings_current SET selected_value = '1.10.0.001' WHERE variable = 'chamilo_database_version'"); //@todo change this into a function - //Web profiler - $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_web_profiler', NULL,'radio','Portal','false','AllowWebProfilerTitle','AllowWebProfilerComment', NULL, NULL, 0)"); + // Web profiler + /*$this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_web_profiler', NULL,'radio','Portal','false','AllowWebProfilerTitle','AllowWebProfilerComment', NULL, NULL, 0)"); $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_web_profiler', 'true', 'Yes')"); - $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_web_profiler', 'false', 'No')"); + $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_web_profiler', 'false', 'No')");*/ } @@ -33,9 +33,9 @@ class Version10 extends AbstractMigration */ public function down(Schema $schema) { - $this->addSql("UPDATE settings_current SET selected_value = '1.9.0.18715.doc' WHERE variable = 'chamilo_database_version'"); - //Web profiler - $this->addSql("DELETE FROM settings_current WHERE variable = 'allow_web_profiler'"); - $this->addSql("DELETE FROM settings_options WHERE variable = 'allow_web_profiler'"); + $this->addSql("UPDATE settings_current SET selected_value = '1.9.0' WHERE variable = 'chamilo_database_version'"); + // Web profiler + /* $this->addSql("DELETE FROM settings_current WHERE variable = 'allow_web_profiler'"); + $this->addSql("DELETE FROM settings_options WHERE variable = 'allow_web_profiler'");*/ } -} \ No newline at end of file +}