]> git.treefish.org Git - banana.git/blobdiff - include/prefs.inc
moved db to admin area and dbscheme to seperate unique file.
[banana.git] / include / prefs.inc
index 58aac3e08a00047bf30315002cd323fddc8ad08d..a3e1aaaf9c57857bfc27579de62bf0badf93d564 100644 (file)
@@ -1,9 +1,10 @@
 <?php
   include 'db.inc';
 
-  $result = $db->query("SELECT key, value FROM prefs");
-  while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
-    $PREFS[$row['key']] = $row['value'];
+  if (! isset($PREFS)) {
+    $result = $db->query("SELECT key, value FROM prefs");
+    while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
+      $PREFS[$row['key']] = $row['value'];
+    }
   }  
-
 ?>