From 520f3c738acee8c40ab71fd8134f92683adb5eec Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 29 Apr 2006 19:05:06 +0000 Subject: [PATCH] r770: We now show an error if the first query to the datacache fails so that users can see an install link. Closes bug://problem/20 --- docs/changes.txt | 4 ++++ includes/init.php | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index a1f822d..ddc2cbf 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,3 +1,7 @@ +1.1.0 +================== +- If the first SQL query fails (datastore fetch), show a link to the installer (http://bugs.iris-studios.com/showreport.php?bugid=20) + 1.0.2 ================== - User help cache was not rebuilt for descriptions in custom fields (http://bugs.iris-studios.com/showreport.php?bugid=7) diff --git a/includes/init.php b/includes/init.php index 74d293e..0eb51e0 100755 --- a/includes/init.php +++ b/includes/init.php @@ -80,7 +80,16 @@ header("Pragma: no-cache"); // ################################################################### // populate our caches +$db->showerrors = false; $datastoretemp = $db->query("SELECT * FROM " . TABLE_PREFIX . "datastore"); +$db->showerrors = true; + +if (!$datastoretemp) +{ + echo '
Notice: This error could be caused if you have not installed Bugdar. If this is the case, you can run the installer here.

'; + $db->error('Invalid SQL error'); +} + while ($store = $db->fetch_array($datastoretemp)) { $bugsys->datastore["$store[title]"] = unserialize($store['data']); -- 2.43.5