From 539380b0b3379be3335615d8fc492061c77a2d5c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 30 Mar 2006 02:40:06 +0000 Subject: [PATCH] r767: Linking to ISSO2 is done --- global.php | 8 ++++---- includes/init.php | 41 ++++++++++++++++++----------------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/global.php b/global.php index 365d037..db51b7d 100755 --- a/global.php +++ b/global.php @@ -23,10 +23,10 @@ require_once('./includes/init.php'); // ################################################################### // initialize template system -$bugsys->load('template_fs'); -$template->extension = 'tpl'; -$template->pre_parse_hook = 'isso_pre_parse_hook'; -$template->templatedir = $bugsys->fetch_sourcepath('templates/'); +$bugsys->load('template_fs', 'template', true); +$template->set('extension', 'tpl'); +$template->set('pre_parse_hook', 'isso_pre_parse_hook'); +$template->set('templatedir', 'templates/'); // ################################################################### // global template variables diff --git a/includes/init.php b/includes/init.php index 4cca5e0..85c233d 100755 --- a/includes/init.php +++ b/includes/init.php @@ -25,6 +25,14 @@ error_reporting(E_ALL & ~E_NOTICE); // initialize the database define('ISSO_MT_START', microtime()); +define('ISSO_CHECK_POST_REFERER', 1); + +require_once('./framework/kernel.php'); +$bugsys = new ISSO(); + +$bugsys->set('application', 'Bugdar'); +$bugsys->set('appversion', '[#]verson[#]'); +$bugsys->set('debug', $debug); if (!file_exists('./includes/config.php')) { @@ -33,28 +41,15 @@ if (!file_exists('./includes/config.php')) } require_once('./includes/config.php'); -$thepass = $password; // GAH register_globals -$theuser = $username; - -define('ISSO_ESCAPE_STRINGS', 1); -define('ISSO_CHECK_POST_REFERER', 1); - -require_once($pathtoisso . 'kernel.php'); -$bugsys =& $_isso; -$bugsys->application = 'Bugdar'; -$bugsys->apppath = $bugsys->fetch_sourcepath(getcwd()); -$bugsys->appversion = '[#]version[#]'; -$bugsys->debug = $debug; -$bugsys->sourcepath = $bugsys->fetch_sourcepath($pathtoisso); -$bugsys->load('db_mysql'); -$db->database = $database; -$db->connect($servername, $username, $thepass, $usepconnect); +define('ISSO_DB_LAYER', 'db_mysql'); +$bugsys->load('db_mysql', 'db', true); +$db->connect($servername, $username, $password, $database, $usepconnect); -$bugsys->load('functions'); +$bugsys->load('functions', 'funct', true); $bugsys->exec_sanitize_data(); -$bugsys->load('xml'); +$bugsys->load('xml', 'xml', true); // change cookie expiration to one hour $funct->cookieexp = 3600; @@ -126,7 +121,7 @@ if (!$userinfo) // ################################################################### // initialize localization system -$bugsys->load('localize'); +$bugsys->load('localize', 'lang', true); require_once('./includes/language.php'); @@ -139,15 +134,15 @@ $stylevar['charset'] = $LANGDATA['charset']; // ################################################################### // initialize the date system -$bugsys->load('date'); +$bugsys->load('date', 'datef', true); $datef->usertz = $bugsys->userinfo['timezone']; $datef->fetch_offset(); // ################################################################### // mail system -$bugsys->load('mail'); -$mail->from = $bugsys->options['webmasteremail']; -$mail->fromname = $lang->string('Bugdar Notification'); +$bugsys->load('mail', 'mail', true); +$mail->set('from', $bugsys->options['webmasteremail']); +$mail->set('fromname', $lang->string('Bugdar Notification')); // ################################################################### // load permissions -- 2.22.5