From: martin Date: Thu, 19 Sep 2002 14:07:24 +0000 (+0000) Subject: Got rid of errorlevel configuration - more trouble than it's worth! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ae7aafeb5376cc20efef9402dc6e42530c443855;p=moodle.git Got rid of errorlevel configuration - more trouble than it's worth! Hardcoded it into setup.php now - people who are that keen can change it there. --- diff --git a/admin/config.html b/admin/config.html index 1a9b16a2ae..8271f1d25d 100644 --- a/admin/config.html +++ b/admin/config.html @@ -49,21 +49,6 @@ - -

errorlevel: - - errorlevel, "", "", ""); - unset($options); - ?> - - - - -

maxeditingtime: diff --git a/lib/defaults.php b/lib/defaults.php index 00cc53efdb..7c0f3ba7bb 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -15,8 +15,7 @@ "slasharguments" => true, "proxyhost" => "", "proxyport" => "", - "maxeditingtime" => 1800, - "errorlevel" => 7 + "maxeditingtime" => 1800 ); ?> diff --git a/lib/setup.php b/lib/setup.php index 49d766929a..759bbe8736 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -26,6 +26,10 @@ $db = &ADONewConnection(); $db->PConnect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass,$CFG->dbname); +/// Set error reporting back to normal + error_reporting(7); + + /// Load up any configuration from the config table if ($configs = get_records_sql("SELECT * FROM config")) { @@ -38,13 +42,6 @@ unset($config); } -/// Set error reporting to whatever the admin has said they want - - if (isset($CFG->errorlevel)) { - error_reporting((int)$CFG->errorlevel); - } else { - error_reporting(7); - } /// Location of standard files @@ -55,6 +52,7 @@ $CFG->footer = "$CFG->dirroot/theme/$CFG->theme/footer.html"; $CFG->moddata = "moddata"; + /// Load up theme variables (colours etc) if (!isset($CFG->theme)) { @@ -62,12 +60,14 @@ } require("$CFG->dirroot/theme/$CFG->theme/config.php"); + /// Set language/locale of printed times (must be supported by OS) if (! setlocale ("LC_TIME", $CFG->locale)) { setlocale ("LC_TIME", $CFG->lang); // Might work } + /// The following is a hack to get around the problem of PHP installations /// that have "register_globals" turned off (default since PHP 4.1.0). /// Eventually I'll go through and upgrade all the code to make this unnecessary @@ -78,6 +78,7 @@ if (isset($_SERVER)) { extract($_SERVER); } + /// Load up global environment variables