From c866d9139d9a8fefb3fe8e6f6d03f1202105eebd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 25 Jun 2008 10:57:17 -0400 Subject: [PATCH] init.php is now largely upgraded --- includes/api_user.php | 5 ++--- includes/framework | 2 +- includes/init.php | 38 ++++++++++++++------------------------ 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/includes/api_user.php b/includes/api_user.php index 1b1ee9a..8a78ff0 100644 --- a/includes/api_user.php +++ b/includes/api_user.php @@ -19,8 +19,7 @@ || ################################################################### \*=====================================================================*/ -$GLOBALS['isso:callback']->load('api', null); - +require_once ISSO . '/Api.php'; require_once('./includes/functions_datastore.php'); require_once('./includes/class_sort.php'); @@ -33,7 +32,7 @@ require_once('./includes/class_sort.php'); * @package Bugdar * */ -class UserAPI extends API +class UserAPI extends BSApi { /** * Database fields diff --git a/includes/framework b/includes/framework index b4f6983..52ca011 160000 --- a/includes/framework +++ b/includes/framework @@ -1 +1 @@ -Subproject commit b4f6983f45d12cd8a8fb5d1193cd9db796606434 +Subproject commit 52ca011af1b57c332904401df6e59d9e2702e4ad diff --git a/includes/init.php b/includes/init.php index 9704302..cf2d30a 100755 --- a/includes/init.php +++ b/includes/init.php @@ -22,20 +22,13 @@ error_reporting(E_ALL & ~E_NOTICE); // ################################################################### -// initialize the database +// load the framework define('ISSO_MT_START', microtime()); define('ISSO_CHECK_POST_REFERER', 1); require_once('./includes/version.php'); -require_once('./framework/kernel.php'); -$bugsys = new ISSO(); - -$bugsys->setAppPath(getcwd()); -$bugsys->setApplication('Bugdar'); -$bugsys->setAppVersion(BUGDAR_VERSION); - if (!file_exists('./includes/config.php')) { echo 'includes/config.php needs to be present!'; @@ -44,27 +37,26 @@ if (!file_exists('./includes/config.php')) require_once('./includes/config.php'); -$bugsys->setDebug($debug); - -// ========================= new framework system ======================== define('ISSO', getcwd() . '/includes/framework/'); require_once ISSO . '/App.php'; BSApp::set_debug($debug); -// ======================================================================= -define('ISSO_DB_LAYER', 'db_mysql'); -$bugsys->load('db_mysql', 'db', true); -$db->connect($servername, $username, $password, $database, $usepconnect); +// ################################################################### +// initialize the database + +require_once ISSO . '/DbMySqlI.php'; +$db = BSApp::$db = new BSDBMySQLI(); + +$db->connect($servername, $username, $password, $database); if ($utf8) { $db->query("SET NAMES utf8"); } -$bugsys->load('functions', 'funct', true); -$bugsys->load('xml', 'xml', true); +require_once ISSO . '/Functions.php'; // change cookie expiration to one hour -$funct->cookieexp = 3600; +BSFunctions::set_cookie_timeout(3600); define('DEVDEBUG', $debug); define('TABLE_PREFIX', $tableprefix); @@ -106,7 +98,7 @@ if (!$datastoretemp) $db->error('Invalid SQL error'); } -while ($store = $db->fetch_array($datastoretemp)) +foreach ($datastoretemp as $store) { $bugsys->datastore["$store[title]"] = unserialize($store['data']); } @@ -114,8 +106,6 @@ $bugsys->options = $bugsys->datastore['setting']; $bugsys->options['columnoptions'] = unserialize($bugsys->options['columnoptions']); unset($bugsys->datastore['setting']); -$bugsys->setAppVersion($bugsys->options['trackerversion']); - // ################################################################### // load permissions @@ -173,10 +163,10 @@ else // ################################################################### // initialize the date system -$bugsys->load('date', 'datef', true); -$datef->usertz = $bugsys->userinfo['timezone'] + ($bugsys->userinfo['usedst'] * 1); +require_once ISSO . '/Date.php'; +$datef = BSApp::$date = new BSDate(); +$datef->setUserTimeZone($bugsys->userinfo['timezone'] + ($bugsys->userinfo['usedst'] * 1)); $bugsys->debug('user tz = ' . $bugsys->userinfo['timezone'] . '; use version = ' . $datef->usertz); -$datef->fetch_offset(); // ################################################################### // mail system -- 2.43.5