From e8d3a63fcc0a63e622702d7071ae07aa0dab186c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 19 May 2013 15:23:31 -0400 Subject: [PATCH] Start creating a new global object that does not rely on the old ISSO kernel. (cherry picked from commit b5c854502d59ab671dd709fb84720f387f7cda5c) --- includes/init.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/includes/init.php b/includes/init.php index d1d0ba4..f07359b 100755 --- a/includes/init.php +++ b/includes/init.php @@ -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 -- 2.43.5