diff --git a/db-prefs.php b/db-prefs.php
index 38382193d..7ff64a89c 100644
--- a/db-prefs.php
+++ b/db-prefs.php
@@ -1,4 +1,5 @@
+ // TODO cache last query results
require_once "config.php";
require_once "db.php";
diff --git a/error.php b/error.php
index e1e9045bf..8582f257c 100644
--- a/error.php
+++ b/error.php
@@ -1,7 +1,10 @@
- require_once "version.php" ?>
- require_once "config.php" ?>
-
+ require_once "version.php"
+ require_once "config.php"
+ require_once "db-prefs.php"
+
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+
$ERRORS[0] = "Unknown error";
$ERRORS[1] = "This program requires XmlHttpRequest " .
@@ -32,7 +35,7 @@
- if (DISPLAY_HEADER) { ?>
+ if (get_pref($link, 'DISPLAY_HEADER')) { ?>
@@ -55,7 +58,7 @@
- if (DISPLAY_FOOTER) { ?>
+ if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
|