Permalink
Browse files

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.
  • Loading branch information...
1 parent 1be8717 commit ae7aafeb5376cc20efef9402dc6e42530c443855 martin committed Sep 19, 2002
Showing with 9 additions and 24 deletions.
  1. +0 −15 admin/config.html
  2. +1 −2 lib/defaults.php
  3. +8 −7 lib/setup.php
View
@@ -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>
View
@@ -15,8 +15,7 @@
"slasharguments" => true,
"proxyhost" => "",
"proxyport" => "",
- "maxeditingtime" => 1800,
- "errorlevel" => 7
+ "maxeditingtime" => 1800
);
?>
View
@@ -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,19 +52,22 @@
$CFG->footer = "$CFG->dirroot/theme/$CFG->theme/footer.html";
$CFG->moddata = "moddata";
+
/// Load up theme variables (colours etc)
if (!isset($CFG->theme)) {
$CFG->theme = "standard";
}
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

0 comments on commit ae7aafe

Please sign in to comment.