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.
This commit is contained in:
martin
2002-09-19 14:07:24 +00:00
parent 1be8717562
commit ae7aafeb53
3 changed files with 9 additions and 24 deletions
-15
View File
@@ -49,21 +49,6 @@
<? print_string("configgdversion") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P>errorlevel:</TD>
<TD>
<? $options[15] = get_string("all");
$options[7] = get_string("normal");
$options[0] = get_string("none");
choose_from_menu ($options, "errorlevel", $config->errorlevel, "", "", "");
unset($options);
?>
</TD>
<TD>
<? print_string("configerrorlevel") ?>
</TD>
</TR>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT><P>maxeditingtime:</TD>
<TD>
+1 -2
View File
@@ -15,8 +15,7 @@
"slasharguments" => true,
"proxyhost" => "",
"proxyport" => "",
"maxeditingtime" => 1800,
"errorlevel" => 7
"maxeditingtime" => 1800
);
?>
+8 -7
View File
@@ -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