Adding dev settings in configuration.php

skala
Julio Montoya 13 years ago
parent 2180e7e9c1
commit d01b21fd1e
  1. 17
      config/configuration.dist.php
  2. 3
      main/inc/global.inc.php
  3. 19
      main/inc/services.php
  4. 18
      src/ChamiloLMS/Migrations/Version10.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;

@ -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']) {

@ -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);
//}
}
}

@ -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'");*/
}
}
}

Loading…
Cancel
Save