Start creating a new global object that does not rely on the old ISSO kernel.
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 19 May 2013 19:23:31 +0000 (15:23 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 28 May 2013 13:59:25 +0000 (09:59 -0400)
includes/init.php

index d1d0ba4300afd9013d5b9a5f566e6edb5bd0fad6..f07359ba7be9e840c7b3e5ff33f3c07da450fd43 100755 (executable)
@@ -78,6 +78,17 @@ $bugsys->options = array();
 $bugsys->userinfo = array();
 $bugsys->datastore = array();
 
+class bugdar
+{
+       static $db = NULL;
+
+       static $options = array();
+       static $user = array();
+       static $datastore = array();
+}
+
+bugdar::$db = $db->dblink;
+
 // ###################################################################
 // send nocache
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@@ -106,9 +117,11 @@ while ($store = $db->fetch_array($datastoretemp))
 {
        $bugsys->datastore["$store[title]"] = unserialize($store['data']);
 }
+bugdar::$datastore = $bugsys->datastore;
 $bugsys->options = $bugsys->datastore['setting'];
 $bugsys->options['columnoptions'] = unserialize($bugsys->options['columnoptions']);
 unset($bugsys->datastore['setting']);
+bugdar::$options = $bugsys->options;
 
 $bugsys->setAppVersion($bugsys->options['trackerversion']);
 
@@ -137,6 +150,7 @@ else
 {
        $bugsys->userinfo = fetch_guest_user();
 }
+bugdar::$user = $bugsys->userinfo;
 
 // ###################################################################
 // initialize localization system