From c8157cef782952273e64c2d06f5b24bb0e3a44fd Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 27 May 2013 22:11:44 -0400 Subject: [PATCH] Capitalize the Bugdar class to differentiate it from the namespace. --- admin/setting.php | 14 +++++++------- admin/user.php | 8 ++++---- admin/usergroup.php | 4 ++-- explain.php | 12 ++++++------ help.php | 4 ++-- includes/functions_datastore.php | 30 +++++++++++++++--------------- includes/functions_product.php | 14 +++++++------- includes/init.php | 22 +++++++++++----------- login.php | 2 +- newreport.php | 6 +++--- register.php | 8 ++++---- search.php | 10 +++++----- showhistory.php | 4 ++-- showreport.php | 32 ++++++++++++++++---------------- syndicate.php | 6 +++--- userctrl.php | 2 +- 16 files changed, 89 insertions(+), 89 deletions(-) diff --git a/admin/setting.php b/admin/setting.php index bae5916..15a0bb2 100755 --- a/admin/setting.php +++ b/admin/setting.php @@ -132,7 +132,7 @@ if ($_REQUEST['do'] == 'modify') // defaultlanguage $admin->row_span(T('Default Language'), 'thead'); - $admin->row_text(T('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', bugdar::$datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']); + $admin->row_text(T('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', Bugdar::$datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']); // syndicateditems $admin->row_span(T('Number of Syndicated Items'), 'thead'); @@ -154,23 +154,23 @@ if ($_REQUEST['do'] == 'modify') // defaultseverity $admin->row_span(T('Default Severity'), 'thead'); - $admin->row_text(T('The default severity that is selected when creating a new bug report.'), construct_option_select('setting[defaultseverity]', bugdar::$datastore['severity'], $bugsys->options['defaultseverity'], 'severityid', 'severity')); + $admin->row_text(T('The default severity that is selected when creating a new bug report.'), construct_option_select('setting[defaultseverity]', Bugdar::$datastore['severity'], $bugsys->options['defaultseverity'], 'severityid', 'severity')); // defaultpriority $admin->row_span(T('Default Priority'), 'thead'); - $admin->row_text(T('The default priority that will be selected when creating a new bug report. Depending on your permission setup, the user may not be able to set this in a new report so this will act as the value.'), construct_option_select('setting[defaultpriority]', bugdar::$datastore['priority'], $bugsys->options['defaultpriority'], 'priorityid', 'priority')); + $admin->row_text(T('The default priority that will be selected when creating a new bug report. Depending on your permission setup, the user may not be able to set this in a new report so this will act as the value.'), construct_option_select('setting[defaultpriority]', Bugdar::$datastore['priority'], $bugsys->options['defaultpriority'], 'priorityid', 'priority')); // defaultstatus $admin->row_span(T('Default Status'), 'thead'); - $admin->row_text(T('The default default that is selected when creating a new bug report. If a user can not assign a status, this will be the one inserted into the database.'), construct_option_select('setting[defaultstatus]', bugdar::$datastore['status'], $bugsys->options['defaultstatus'], 'statusid', 'status')); + $admin->row_text(T('The default default that is selected when creating a new bug report. If a user can not assign a status, this will be the one inserted into the database.'), construct_option_select('setting[defaultstatus]', Bugdar::$datastore['status'], $bugsys->options['defaultstatus'], 'statusid', 'status')); // defaultresolve $admin->row_span(T('Default Resolution'), 'thead'); - $admin->row_text(T('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.'), construct_option_select('setting[defaultresolve]', bugdar::$datastore['resolution'], $bugsys->options['defaultresolve'], 'resolutionid', 'resolution')); + $admin->row_text(T('This is the default bug resolution. If a user is not able to change this field, setting this will act as the default value.'), construct_option_select('setting[defaultresolve]', Bugdar::$datastore['resolution'], $bugsys->options['defaultresolve'], 'resolutionid', 'resolution')); // defaultassign $admin->row_span(T('Default Bug Assignment'), 'thead'); - $admin->row_text(T('This is the default developer new bugs will be assigned to. If a user does not have permisssion to assign bugs, this will be the default. If you don\'t want any default assignment, leave this as Not Selected.'), construct_option_select('setting[defaultassign]', bugdar::$datastore['assignto'], $bugsys->options['defaultassign'], 'userid', 'displayname', 0)); + $admin->row_text(T('This is the default developer new bugs will be assigned to. If a user does not have permisssion to assign bugs, this will be the default. If you don\'t want any default assignment, leave this as Not Selected.'), construct_option_select('setting[defaultassign]', Bugdar::$datastore['assignto'], $bugsys->options['defaultassign'], 'userid', 'displayname', 0)); // defaultcomment $admin->row_span(T('Default Comment Text'), 'thead'); @@ -184,7 +184,7 @@ if ($_REQUEST['do'] == 'modify') // hidestatuses $admin->row_span(T('Hide Statuses on Bug Listings'), 'thead'); - $admin->row_text(T('Here you can specify which statuses to hide on the bug list displays. Users have options in their controls to change this from these values, and this does not affect searches or the favorites list.'), construct_option_select('setting[hidestatuses]', bugdar::$datastore['status'], $bugsys->options['hidestatuses'], 'statusid', 'status', 0, true)); + $admin->row_text(T('Here you can specify which statuses to hide on the bug list displays. Users have options in their controls to change this from these values, and this does not affect searches or the favorites list.'), construct_option_select('setting[hidestatuses]', Bugdar::$datastore['status'], $bugsys->options['hidestatuses'], 'statusid', 'status', 0, true)); // defaultsortkey $admin->row_span(T('Default Sort Column'), 'thead'); diff --git a/admin/user.php b/admin/user.php index a7d5606..c3da947 100644 --- a/admin/user.php +++ b/admin/user.php @@ -196,14 +196,14 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') $admin->row_input(T('Email'), 'email', $user->objdata['email']); $admin->row_input(($add ? T('Password') : T('Password (Leave blank for no change)')), 'password'); - foreach (bugdar::$datastore['usergroup'] AS $group) + foreach (Bugdar::$datastore['usergroup'] AS $group) { $admin->list_item($group['title'], $group['usergroupid'], ($user->objdata['usergroupid'] == $group['usergroupid'])); } $admin->row_list(T('Primary Usergroup'), 'usergroupid'); $ids = explode(',', $user->objdata['groupids']); - foreach (bugdar::$datastore['usergroup'] AS $id => $group) + foreach (Bugdar::$datastore['usergroup'] AS $id => $group) { if ($id == $user->objdata['usergroupid']) { @@ -216,7 +216,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') $admin->row_yesno(T('Show Email Publicly'), 'showemail', $user->objdata['showemail']); $admin->row_yesno(T('Show Status Colors on Bug Listings'), 'showcolors', $user->objdata['showcolors']); - foreach (bugdar::$datastore['language'] AS $language) + foreach (Bugdar::$datastore['language'] AS $language) { $admin->list_item($language['title'], $language['languageid'], ($user->objdata['languageid'] == $language['languageid'])); } @@ -229,7 +229,7 @@ if ($_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add') $admin->row_list(T('Timezone'), 'timezone'); $admin->row_yesno(T('Observe Daylight Savings Time (DST)'), 'usedst', $user->objdata['usedst']); - $admin->row_text(T('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', bugdar::$datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true)); + $admin->row_text(T('Hidden Statuses on Bug Listing'), construct_option_select('hidestatuses', Bugdar::$datastore['status'], $user->objdata['hidestatuses'], 'statusid', 'status', 0, true)); $admin->row_text(T('Default Sort Order Column'), construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $user->objdata['defaultsortkey'])); $admin->row_text(T('Default Sort Order Direction'), construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $user->objdata['defaultsortas'])); diff --git a/admin/usergroup.php b/admin/usergroup.php index bbb43d2..5ae90ac 100755 --- a/admin/usergroup.php +++ b/admin/usergroup.php @@ -334,7 +334,7 @@ if ($_POST['do'] == 'doapprove') $users = $db->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid IN (" . implode(',', $idlist) . ")"); while ($user = $db->fetch_array($users)) { - $tpl = $template->fetch(FetchEmailPath('accountapproved.xml', bugdar::$datastore['language'][$bugsys->options['defaultlanguage']]['langcode'])); + $tpl = $template->fetch(FetchEmailPath('accountapproved.xml', Bugdar::$datastore['language'][$bugsys->options['defaultlanguage']]['langcode'])); eval('$email = "' . $tpl . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); @@ -368,7 +368,7 @@ if ($_REQUEST['do'] == 'approve') { $admin->row_multi_item(array( '' . $user['email'] . '' => 'l', - bugdar::$datastore['usergroup']["$user[usergroupid]"]['title'] => 'c', + Bugdar::$datastore['usergroup']["$user[usergroupid]"]['title'] => 'c', '' => 'c' )); } diff --git a/explain.php b/explain.php index 9e2b20b..d967439 100644 --- a/explain.php +++ b/explain.php @@ -41,12 +41,12 @@ if (empty($_REQUEST['do'])) if ($_REQUEST['do'] == 'products') { - if (!is_array(bugdar::$datastore['product'])) + if (!is_array(Bugdar::$datastore['product'])) { $message->error(T('There are no products set up.')); } - foreach (bugdar::$datastore['product'] AS $product) + foreach (Bugdar::$datastore['product'] AS $product) { if ($product['parentid']) { @@ -58,7 +58,7 @@ if ($_REQUEST['do'] == 'products') } } - foreach (bugdar::$datastore['version'] AS $version) + foreach (Bugdar::$datastore['version'] AS $version) { $versions["$version[productid]"]["$version[versionid]"] = $version; } @@ -114,9 +114,9 @@ if ($_REQUEST['do'] == 'automations') $fields["$field[fieldid]"] = $field; } - if (is_array(bugdar::$datastore['automation'])) + if (is_array(Bugdar::$datastore['automation'])) { - foreach (bugdar::$datastore['automation'] AS $automation) + foreach (Bugdar::$datastore['automation'] AS $automation) { $automation['fieldchanges'] = unserialize($automation['fieldchanges']); @@ -142,7 +142,7 @@ if ($_REQUEST['do'] == 'automations') foreach ($automation['fieldchanges']['builtin'] AS $name => $value) { $left = $name; - $right = bugdar::$datastore["$left"]["$value"]["$left"]; + $right = Bugdar::$datastore["$left"]["$value"]["$left"]; eval('$automations .= "' . $template->fetch('explain_row') . '";'); } } diff --git a/help.php b/help.php index 044a003..4a10318 100644 --- a/help.php +++ b/help.php @@ -26,14 +26,14 @@ $fetchtemplates = array( require_once('./global.php'); -if (!$bugsys->in['topic'] OR !isset(bugdar::$datastore['help'][ $bugsys->in['topic'] ])) +if (!$bugsys->in['topic'] OR !isset(Bugdar::$datastore['help'][ $bugsys->in['topic'] ])) { $topic['title'] = T('Invalid'); $topic['body'] = T('That help topic does not exist in the system.'); } else { - $topic = bugdar::$datastore['help'][ $bugsys->in['topic'] ]; + $topic = Bugdar::$datastore['help'][ $bugsys->in['topic'] ]; $topic['body'] = nl2br($topic['body']); } diff --git a/includes/functions_datastore.php b/includes/functions_datastore.php index 74ca7b3..0fea3d9 100755 --- a/includes/functions_datastore.php +++ b/includes/functions_datastore.php @@ -36,7 +36,7 @@ function build_languages() VALUES ('language', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['language'] = $tempstore; + Bugdar::$datastore['language'] = $tempstore; } // ####################### Start build_settings ###################### @@ -56,7 +56,7 @@ function build_settings() VALUES ('setting', '" . $bugsys->escape(serialize($options)) . "')" ); - bugdar::$datastore['setting'] = $options; + Bugdar::$datastore['setting'] = $options; } // ###################### Start build_usergroups ##################### @@ -76,7 +76,7 @@ function build_usergroups() VALUES ('usergroup', '" . $bugsys->escape(serialize($groups)) . "')" ); - bugdar::$datastore['usergroup'] = $groups; + Bugdar::$datastore['usergroup'] = $groups; } // ####################### Start build_statuses ###################### @@ -96,7 +96,7 @@ function build_statuses() VALUES ('status', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['status'] = $tempstore; + Bugdar::$datastore['status'] = $tempstore; } // ###################### Start build_severities ##################### @@ -116,7 +116,7 @@ function build_severities() VALUES ('severity', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['severity'] = $tempstore; + Bugdar::$datastore['severity'] = $tempstore; } // ###################### Start build_priorities ##################### @@ -136,7 +136,7 @@ function build_priorities() VALUES ('priority', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['priority'] = $tempstore; + Bugdar::$datastore['priority'] = $tempstore; } // ###################### Start build_assignedto ##################### @@ -146,7 +146,7 @@ function build_assignedto() // determine the groups that are assignable $ids = $exprs = array(); - foreach (bugdar::$datastore['usergroup'] AS $id => $group) + foreach (Bugdar::$datastore['usergroup'] AS $id => $group) { if ($group['permissions'] & $bugsys->permissions['canbeassignedto']) { @@ -173,7 +173,7 @@ function build_assignedto() VALUES ('assignto', '" . $bugsys->escape(serialize($devs)) . "')" ); - bugdar::$datastore['assignto'] = $devs; + Bugdar::$datastore['assignto'] = $devs; } // ##################### Start build_resolutions ##################### @@ -193,7 +193,7 @@ function build_resolutions() VALUES ('resolution', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['resolution'] = $tempstore; + Bugdar::$datastore['resolution'] = $tempstore; } // ####################### Start build_versions ###################### @@ -213,7 +213,7 @@ function build_versions() VALUES ('version', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['version'] = $tempstore; + Bugdar::$datastore['version'] = $tempstore; } // ####################### Start build_products ###################### @@ -242,8 +242,8 @@ function build_products() ('component', '" . $bugsys->escape(serialize($tempstore['component'])) . "')" ); - bugdar::$datastore['product'] = $tempstore['product']; - bugdar::$datastore['component'] = $tempstore['component']; + Bugdar::$datastore['product'] = $tempstore['product']; + Bugdar::$datastore['component'] = $tempstore['component']; } // ##################### Start build_permissions ##################### @@ -263,7 +263,7 @@ function build_permissions() VALUES ('permission', '" . $bugsys->escape(serialize($tempstore)) . "')" ); - bugdar::$datastore['permission'] = $tempstore; + Bugdar::$datastore['permission'] = $tempstore; } // ##################### Start build_automations #################### @@ -283,7 +283,7 @@ function build_automations() VALUES ('automation', '" . $bugsys->escape(serialize($actions)) . "')" ); - bugdar::$datastore['automation'] = $actions; + Bugdar::$datastore['automation'] = $actions; } // ###################### Start build_user_help ###################### @@ -311,6 +311,6 @@ function build_user_help() VALUES ('help', '" . $bugsys->escape(serialize($help)) . "')" ); - bugdar::$datastore['help'] = $help; + Bugdar::$datastore['help'] = $help; } diff --git a/includes/functions_product.php b/includes/functions_product.php index 3779ea4..2a89a14 100644 --- a/includes/functions_product.php +++ b/includes/functions_product.php @@ -40,16 +40,16 @@ function ConstructProductSelect($action = 'canviewbugs', $select = null, $obsole // index all of the components by parent and ID $components = array(); - if (is_array(bugdar::$datastore['component'])) + if (is_array(Bugdar::$datastore['component'])) { - foreach (bugdar::$datastore['component'] AS $id => $prod) + foreach (Bugdar::$datastore['component'] AS $id => $prod) { $components["$prod[parentid]"]["$id"] = $prod; } } // these are products - foreach (bugdar::$datastore['product'] AS $productid => $product) + foreach (Bugdar::$datastore['product'] AS $productid => $product) { if (!can_perform($action, $product['productid']) OR !can_perform('canviewbugs', $product['productid'])) { @@ -90,7 +90,7 @@ function ConstructVersionSelect($productid, $select, $obsolete) { global $bugsys; - $product = bugdar::$datastore['product']["$productid"]; + $product = Bugdar::$datastore['product']["$productid"]; $component = null; $build = ''; @@ -98,11 +98,11 @@ function ConstructVersionSelect($productid, $select, $obsolete) // this is a component if ($product == null) { - $component = bugdar::$datastore['component']["$productid"]; - $product = bugdar::$datastore['product']["$component[parentid]"]; + $component = Bugdar::$datastore['component']["$productid"]; + $product = Bugdar::$datastore['product']["$component[parentid]"]; } - foreach (bugdar::$datastore['version'] AS $versionid => $version) + foreach (Bugdar::$datastore['version'] AS $versionid => $version) { if ((!$version['productid'] OR $version['productid'] == $component['productid'] OR $version['productid'] == $product['productid']) AND (!$version['obsolete'] OR ($version['obsolete'] AND $obsolete))) { diff --git a/includes/init.php b/includes/init.php index d1b9d1f..6167efe 100755 --- a/includes/init.php +++ b/includes/init.php @@ -76,9 +76,9 @@ require_once('./includes/language.php'); // init the big three $bugsys->options = array(); $bugsys->userinfo = array(); -bugdar::$datastore = array(); +Bugdar::$datastore = array(); -class bugdar +class Bugdar { /*! @var \PDO The database connection instance. */ static $db = NULL; @@ -103,11 +103,11 @@ require_once HOPLITE_ROOT . '/data/model.php'; \hoplite\data\Model::set_db($db->dblink); require_once HOPLITE_ROOT . '/http/input.php'; -bugdar::$input = new \hoplite\http\Input(\hoplite\http\Input::TYPE_HTML); +Bugdar::$input = new \hoplite\http\Input(\hoplite\http\Input::TYPE_HTML); -bugdar::$db = $db->dblink; +Bugdar::$db = $db->dblink; -bugdar::$db->SetAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING); +Bugdar::$db->SetAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING); // ################################################################### // send nocache @@ -135,13 +135,13 @@ if (!$datastoretemp) while ($store = $db->fetch_array($datastoretemp)) { - bugdar::$datastore["$store[title]"] = unserialize($store['data']); + Bugdar::$datastore["$store[title]"] = unserialize($store['data']); } -$bugsys->options = bugdar::$datastore['setting']; +$bugsys->options = Bugdar::$datastore['setting']; $bugsys->options['columnoptions'] = unserialize($bugsys->options['columnoptions']); -unset(bugdar::$datastore['setting']); -bugdar::$options = $bugsys->options; +unset(Bugdar::$datastore['setting']); +Bugdar::$options = $bugsys->options; $bugsys->setAppVersion($bugsys->options['trackerversion']); @@ -163,14 +163,14 @@ if ($auth->authenticateCookies()) { $bugsys->userinfo = $auth->fetchBugdarUser(); $bugsys->userinfo['permissions'] = FetchUserPermissions($bugsys->userinfo); - $bugsys->userinfo['displaytitle'] = bugdar::$datastore['usergroup'][ $bugsys->userinfo['usergroupid'] ]['displaytitle']; + $bugsys->userinfo['displaytitle'] = Bugdar::$datastore['usergroup'][ $bugsys->userinfo['usergroupid'] ]['displaytitle']; $bugsys->userinfo['columnoptions'] = unserialize($bugsys->userinfo['columnoptions']); } else { $bugsys->userinfo = fetch_guest_user(); } -bugdar::$user = $bugsys->userinfo; +Bugdar::$user = $bugsys->userinfo; // ################################################################### // initialize localization system diff --git a/login.php b/login.php index 92f9f5d..e035384 100755 --- a/login.php +++ b/login.php @@ -120,7 +120,7 @@ if ($_POST['do'] == 'sendpw') $activator = $funct->rand(25); $db->query("INSERT INTO " . TABLE_PREFIX . "passwordreset (activatorid, dateline, userid) VALUES ('" . $activator . "', " . TIMENOW . ", " . $user->objdata['userid'] . ")"); - eval('$email = "' . $template->fetch(FetchEmailPath('passwordreset.xml', bugdar::$datastore['language'][$user->objdata['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('passwordreset.xml', Bugdar::$datastore['language'][$user->objdata['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); diff --git a/newreport.php b/newreport.php index 72e193f..79d6fe3 100755 --- a/newreport.php +++ b/newreport.php @@ -138,11 +138,11 @@ if ($_POST['do'] == 'insert') if ($_REQUEST['do'] == 'add') { - if (!is_array(bugdar::$datastore['product'])) + if (!is_array(Bugdar::$datastore['product'])) { $message->error(T('No products have been setup, therefore no bugs can be added.')); } - if (!is_array(bugdar::$datastore['version'])) + if (!is_array(Bugdar::$datastore['version'])) { $message->error(T('No versions have been setup underneath your product(s), therefore no bugs can be added.')); } @@ -162,7 +162,7 @@ if ($_REQUEST['do'] == 'add') if (can_perform('canassign')) { - foreach (bugdar::$datastore['assignto'] AS $dev) + foreach (Bugdar::$datastore['assignto'] AS $dev) { $value = $dev['userid']; $label = construct_user_display($dev, false); diff --git a/register.php b/register.php index 84e17c8..ae041cb 100755 --- a/register.php +++ b/register.php @@ -95,7 +95,7 @@ if ($_POST['do'] == 'insert') $db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)"); - eval('$email = "' . $template->fetch(FetchEmailPath('activateaccount.xml', bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('activateaccount.xml', Bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); @@ -109,7 +109,7 @@ if ($_POST['do'] == 'insert') if ($bugsys->options['sendwelcomemail']) { $displayName = $bugsys->in['displayname']; - eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', Bugdar::$datastore['language'][$bugsys->in['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); @@ -147,7 +147,7 @@ if (empty($_REQUEST['do'])) $message->error(T('Sorry, we don\'t allow new registrations.')); } - foreach (bugdar::$datastore['language'] AS $value => $temp) + foreach (Bugdar::$datastore['language'] AS $value => $temp) { $label = $temp['title']; $selected = ($value == $bugsys->in['languageid']); @@ -171,7 +171,7 @@ if ($_REQUEST['do'] == 'activate') if ($bugsys->options['sendwelcomemail']) { $displayName = $user['displayname']; - eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', bugdar::$datastore['language'][$user['languageid']]['langcode'])) . '";'); + eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', Bugdar::$datastore['language'][$user['languageid']]['langcode'])) . '";'); $email = $bugsys->xml->parse($email); $mail->setSubject($email['email']['subject']['value']); $mail->setBodyText($email['email']['bodyText']['value']); diff --git a/search.php b/search.php index 4c71934..816fd89 100644 --- a/search.php +++ b/search.php @@ -108,12 +108,12 @@ if ($_REQUEST['do'] == 'search') if ($newsearch) { - if (!is_array(bugdar::$datastore['product'])) + if (!is_array(Bugdar::$datastore['product'])) { $message->error(T('No products are setup, therefore there can be no bugs and thus search cannot function.')); } - if (!is_array(bugdar::$datastore['version'])) + if (!is_array(Bugdar::$datastore['version'])) { $message->error(T('No versions have been added underneath your product(s), there can be no bugs and thus search cannot function.')); } @@ -157,7 +157,7 @@ if ($_REQUEST['do'] == 'search') } $select['dev'] = ''; - foreach (bugdar::$datastore['assignto'] AS $dev) + foreach (Bugdar::$datastore['assignto'] AS $dev) { $value = $dev['userid']; $label = construct_user_display($dev, false); @@ -481,7 +481,7 @@ if ($_REQUEST['do'] == 'update') $selected = true; eval('$select[dev] .= "' . $template->fetch('selectoption') . '";'); $selected = false; - foreach (bugdar::$datastore['assignto'] AS $dev) + foreach (Bugdar::$datastore['assignto'] AS $dev) { $value = $dev['userid']; $label = construct_user_display($dev, false); @@ -618,7 +618,7 @@ if ($_REQUEST['do'] == 'export') $xml .= "\n\t\t" . $bug['status'] . ""; if ($bug['assignedto']) { - $xml .= "\n\t\t" . construct_user_display(bugdar::$datastore['assignto']["$bug[assignedto]"], false) . ""; + $xml .= "\n\t\t" . construct_user_display(Bugdar::$datastore['assignto']["$bug[assignedto]"], false) . ""; } $xml .= "\n\t\t" . $bug['resolution'] . ""; $xml .= "\n\t\t" . $bug['severity'] . ""; diff --git a/showhistory.php b/showhistory.php index d46bc87..51b0767 100644 --- a/showhistory.php +++ b/showhistory.php @@ -132,8 +132,8 @@ foreach ($logs AS $dateline => $logitems) if (isset($lookupfields["$matches[1]"])) { $lookup = $matches[1]; - $log['original'] = bugdar::$datastore["$lookup"]["$log[original]"][ $lookupfields["$lookup"] ]; - $log['changed'] = bugdar::$datastore["$lookup"]["$log[changed]"][ $lookupfields["$lookup"] ]; + $log['original'] = Bugdar::$datastore["$lookup"]["$log[original]"][ $lookupfields["$lookup"] ]; + $log['changed'] = Bugdar::$datastore["$lookup"]["$log[changed]"][ $lookupfields["$lookup"] ]; } else if ($matches[1] == 'assignto' OR $matches[1] == 'assignedto') { diff --git a/showreport.php b/showreport.php index 49f9491..ae8a379 100644 --- a/showreport.php +++ b/showreport.php @@ -96,16 +96,16 @@ if ($show['edit']) } else { - $bug['status'] = bugdar::$datastore['status']["$bug[status]"]['status']; - $bug['resolution'] = bugdar::$datastore['resolution']["$bug[resolution]"]['resolution']; - $bug['severity'] = bugdar::$datastore['severity']["$bug[severity]"]['severity']; - $bug['priority'] = bugdar::$datastore['priority']["$bug[priority]"]['priority']; + $bug['status'] = Bugdar::$datastore['status']["$bug[status]"]['status']; + $bug['resolution'] = Bugdar::$datastore['resolution']["$bug[resolution]"]['resolution']; + $bug['severity'] = Bugdar::$datastore['severity']["$bug[severity]"]['severity']; + $bug['priority'] = Bugdar::$datastore['priority']["$bug[priority]"]['priority']; } $show['assign'] = (can_perform('canassign', $bug['product']) ? true : false); - if (can_perform('canassign', $bug['product']) AND is_array(bugdar::$datastore['assignto'])) + if (can_perform('canassign', $bug['product']) AND is_array(Bugdar::$datastore['assignto'])) { - foreach (bugdar::$datastore['assignto'] AS $dev) + foreach (Bugdar::$datastore['assignto'] AS $dev) { $value = $dev['userid']; $selected = (($dev['userid'] == $bug['assignedto']) ? true : false); @@ -134,9 +134,9 @@ if ($show['edit']) $select['automations'] = ''; $show['automations'] = false; - if (is_array(bugdar::$datastore['automation'])) + if (is_array(Bugdar::$datastore['automation'])) { - foreach (bugdar::$datastore['automation'] AS $action) + foreach (Bugdar::$datastore['automation'] AS $action) { $label = $action['name']; $value = $action['actionid']; @@ -160,12 +160,12 @@ else { // ------------------------------------------------------------------- // prep display - $bug['status'] = bugdar::$datastore['status']["$bug[status]"]['status']; - $bug['resolution'] = bugdar::$datastore['resolution']["$bug[resolution]"]['resolution']; - $bug['severity'] = bugdar::$datastore['severity']["$bug[severity]"]['severity']; - $bug['priority'] = bugdar::$datastore['priority']["$bug[priority]"]['priority']; + $bug['status'] = Bugdar::$datastore['status']["$bug[status]"]['status']; + $bug['resolution'] = Bugdar::$datastore['resolution']["$bug[resolution]"]['resolution']; + $bug['severity'] = Bugdar::$datastore['severity']["$bug[severity]"]['severity']; + $bug['priority'] = Bugdar::$datastore['priority']["$bug[priority]"]['priority']; - $assigninfo = bugdar::$datastore['assignto']["$bug[assignedto]"]; + $assigninfo = Bugdar::$datastore['assignto']["$bug[assignedto]"]; $bug['assigninfo'] = ((is_array($assigninfo)) ? construct_user_display($assigninfo) : ''); $duplicateof = $db->query_first("SELECT bugid, summary FROM " . TABLE_PREFIX . "bug WHERE bugid = $bug[duplicateof]"); @@ -201,11 +201,11 @@ $favoritetext = ($favorite ? T('Remove from Favorites') : T('Add to Favorites')) $bug['userinfo'] = construct_user_display($bug); $bug['datetime'] = $datef->format($bugsys->options['dateformat'], $bug['dateline']); $bug['productid'] = $bug['product']; -$bug['product'] = bugdar::$datastore['product']["$bug[product]"]['title']; +$bug['product'] = Bugdar::$datastore['product']["$bug[product]"]['title']; $bug['componentid'] = $bug['component']; -$bug['component'] = ($bug['component'] ? bugdar::$datastore['product']["$bug[component]"]['title'] : ''); +$bug['component'] = ($bug['component'] ? Bugdar::$datastore['product']["$bug[component]"]['title'] : ''); $bug['versionid'] = $bug['version']; -$bug['version'] = bugdar::$datastore['version']["$bug[version]"]['version']; +$bug['version'] = Bugdar::$datastore['version']["$bug[version]"]['version']; // ################################################################### // custom field output diff --git a/syndicate.php b/syndicate.php index cd9ff6f..9d84348 100644 --- a/syndicate.php +++ b/syndicate.php @@ -68,15 +68,15 @@ while ($bug = $db->fetch_array($bugs_fetch)) ' . T('Product/Component/Version') . ': - ' . bugdar::$datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? bugdar::$datastore['product']["$bug[component]"]['title'] . '/' : '') . bugdar::$datastore['version']["$bug[version]"]['version'] . ' + ' . Bugdar::$datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? Bugdar::$datastore['product']["$bug[component]"]['title'] . '/' : '') . Bugdar::$datastore['version']["$bug[version]"]['version'] . ' ' . T('Status') . ': - ' . bugdar::$datastore['status']["$bug[status]"]['status'] . ' + ' . Bugdar::$datastore['status']["$bug[status]"]['status'] . ' ' . T('Severity') . ': - ' . bugdar::$datastore['severity']["$bug[severity]"]['severity'] . ' + ' . Bugdar::$datastore['severity']["$bug[severity]"]['severity'] . '

' . $bug['comment_parsed'] . '

') . ' diff --git a/userctrl.php b/userctrl.php index a6cb70d..8964ffd 100644 --- a/userctrl.php +++ b/userctrl.php @@ -204,7 +204,7 @@ if ($_REQUEST['do'] == 'modify') $langselect = construct_datastore_select('language', 'title', 'languageid', $userinfo['languageid']); $hidestatuses = construct_datastore_select('status', 'status', 'statusid', (!is_array($userinfo['hidestatuses']) ? explode(',', $userinfo['hidestatuses']) : $userinfo['hidestatuses']), 0); - $hidestatusesnum = (sizeof(bugdar::$datastore['status']) < 8 ? sizeof(bugdar::$datastore['status']) + 1 : 8); + $hidestatusesnum = (sizeof(Bugdar::$datastore['status']) < 8 ? sizeof(Bugdar::$datastore['status']) + 1 : 8); $defaultsortkey = construct_option_select('defaultsortkey', ListSorter::fetch_by_text(false), $userinfo['defaultsortkey']); $defaultsortas = construct_option_select('defaultsortas', ListSorter::fetch_as_text(false), $userinfo['defaultsortas']); -- 2.43.5