define('ISSO_PRINTER_NO_NAVIGATION', 1);
- $admin->page_start(T('Login'), null, '', 'document.cplogin.' . ($bugsys->userinfo['email'] ? 'password' : 'email') . '.focus();');
+ $admin->page_start(T('Login'), null, '', 'document.cplogin.' . (bugdar::$userinfo['email'] ? 'password' : 'email') . '.focus();');
$admin->form_start('../login.php', 'cplogin', false, 'cplogin');
$admin->table_start(true, '425');
$admin->table_head(T('Login to Bugdar'));
- $admin->row_input(T('Email'), 'email', $bugsys->userinfo['email'], 2, 35, false, false, 'middle');
+ $admin->row_input(T('Email'), 'email', bugdar::$userinfo['email'], 2, 35, false, false, 'middle');
$admin->row_input(T('Password'), 'password', '', 2, 35, false, true, 'middle');
$admin->row_submit('', T('Login'));
$admin->table_end();
if (can_perform('canadminpanel'))
{
$session = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "adminsession WHERE sessionid = '" . $bugsys->input_escape(COOKIE_PREFIX . 'adminsession') . "'");
- if ($session AND $session['userid'] == $bugsys->userinfo['userid'] AND $session['dateline'] >= (TIMENOW - 3600))
+ if ($session AND $session['userid'] == bugdar::$userinfo['userid'] AND $session['dateline'] >= (TIMENOW - 3600))
{
// renew the cookie
$funct->cookie(COOKIE_PREFIX . 'adminsession', $session['sessionid'], false);
if (!(defined('NO_VERSION_CHECK') AND constant('NO_VERSION_CHECK') == true))
{
- $check = @file_get_contents('http://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace(' ', '-', $bugsys->options['trackerversion']));
+ $check = @file_get_contents('http://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace(' ', '-', bugdar::$options['trackerversion']));
if (strpos($check, '<version-check>') !== false)
{
$check = $bugsys->xml->parse($check);
if (isset($check['version-check']['update']))
{
- $admin->page_code('<div style="background-color: white; border-color: red; border-width: 2px; border-style: solid; color: red; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Update Avaliable') . ':</div>' . sprintf(T('Your installation of Bugdar is out-of-date. You are running version <strong>%1$s</strong> and the latest version is <strong>%2$s</strong>. You can download the update at <a href="http://www.bluestatic.org">Blue Static\'s website</a>. You are strongly encouraged to apply all updates to fix bugs and any security issues (if present).'), $bugsys->options['trackerversion'], $check['version-check']['update']['value']) . '</div>');
+ $admin->page_code('<div style="background-color: white; border-color: red; border-width: 2px; border-style: solid; color: red; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Update Avaliable') . ':</div>' . sprintf(T('Your installation of Bugdar is out-of-date. You are running version <strong>%1$s</strong> and the latest version is <strong>%2$s</strong>. You can download the update at <a href="http://www.bluestatic.org">Blue Static\'s website</a>. You are strongly encouraged to apply all updates to fix bugs and any security issues (if present).'), bugdar::$options['trackerversion'], $check['version-check']['update']['value']) . '</div>');
}
else if (isset($check['version-check']['up-to-date']))
{
- $admin->page_code('<div style="background-color: white; border-color: green; border-width: 2px; border-style: solid; color: green; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Up-to-Date') . ':</div>' . sprintf(T('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), $bugsys->options['trackerversion']) . '</div>');
+ $admin->page_code('<div style="background-color: white; border-color: green; border-width: 2px; border-style: solid; color: green; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Up-to-Date') . ':</div>' . sprintf(T('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), bugdar::$options['trackerversion']) . '</div>');
}
}
}
// -------------------------------------------------------------------
$admin->row_span(T('Version Information'), 'thead');
-$admin->row_text(T('Bugdar Version'), $bugsys->options['trackerversion']);
+$admin->row_text(T('Bugdar Version'), bugdar::$options['trackerversion']);
$admin->row_text(T('PHP Version'), phpversion());
$mysql = $db->query_first("SELECT VERSION() AS version");
$admin->row_multi_item(array(
"<a href=\"language.php?do=edit&languageid=$language[languageid]\">$language[title]</a>" => 'l',
$language['langcode'] . ' / ' . $language['charset'] => 'c',
- (($bugsys->options['defaultlanguage'] == $language['languageid']) ? '<strong>' . T('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? T('User Selectable') : T('Private')) => 'c'
+ ((bugdar::$options['defaultlanguage'] == $language['languageid']) ? '<strong>' . T('DEFAULT LANGUAGE') . '</strong> / ' : '') . ($language['userselect'] ? T('User Selectable') : T('Private')) => 'c'
));
}
{
if (preg_match('#auth_(.*)\.php#', $path, $matches))
{
- $admin->list_item(ucwords(str_replace('_', ' ', $matches[1])), $matches[1], ($matches[1] == $bugsys->options['authmethod']));
+ $admin->list_item(ucwords(str_replace('_', ' ', $matches[1])), $matches[1], ($matches[1] == bugdar::$options['authmethod']));
}
}
$admin->row_list(T('The authentication class to use to validate cookie data and longins. You may need to edit the actual file for certain authentication systems.'), 'setting[authmethod]');
// allownewreg
$admin->row_span(T('Allow New Registrations'), 'thead');
- $admin->row_yesno(T('If this is set to <em>yes</em>, then new users will be allowed to register.'), 'setting[allownewreg]', $bugsys->options['allownewreg']);
+ $admin->row_yesno(T('If this is set to <em>yes</em>, then new users will be allowed to register.'), 'setting[allownewreg]', bugdar::$options['allownewreg']);
// verifyemail
$admin->row_span(T('Require Activation Email'), 'thead');
- $admin->row_yesno(T('Setting this to yes will force all new users to verify their account with an email activation link.'), 'setting[verifyemail]', $bugsys->options['verifyemail']);
+ $admin->row_yesno(T('Setting this to yes will force all new users to verify their account with an email activation link.'), 'setting[verifyemail]', bugdar::$options['verifyemail']);
// moderatenewusers
$admin->row_span(T('Moderate New Users'), 'thead');
- $admin->row_yesno(T('All new users will have to be approved by the administration before being able to have normal user rights.'), 'setting[moderatenewusers]', $bugsys->options['moderatenewusers']);
+ $admin->row_yesno(T('All new users will have to be approved by the administration before being able to have normal user rights.'), 'setting[moderatenewusers]', bugdar::$options['moderatenewusers']);
// sendwelcomemail
$admin->row_span(T('Send New Use Welcome Email'), 'thead');
- $admin->row_yesno(T('Setting this option to <em>yes</em> will send each new verified user a welcome email.'), 'setting[sendwelcomemail]', $bugsys->options['sendwelcomemail']);
+ $admin->row_yesno(T('Setting this option to <em>yes</em> will send each new verified user a welcome email.'), 'setting[sendwelcomemail]', bugdar::$options['sendwelcomemail']);
// webmasteremail
$admin->row_span(T('Webmaster Email Address'), 'thead');
- $admin->row_input(T('The email address from which emails will be sent out.'), 'setting[webmasteremail]', $bugsys->options['webmasteremail']);
+ $admin->row_input(T('The email address from which emails will be sent out.'), 'setting[webmasteremail]', bugdar::$options['webmasteremail']);
// trackertitle
$admin->row_span(T('Tracker Title'), 'thead');
- $admin->row_input(T('The global name of the bug tracker. Example: Blue Static Bug Tracker'), 'setting[trackertitle]', $bugsys->options['trackertitle']);
+ $admin->row_input(T('The global name of the bug tracker. Example: Blue Static Bug Tracker'), 'setting[trackertitle]', bugdar::$options['trackertitle']);
// trackerurl
$admin->row_span(T('Tracker Base URL'), 'thead');
- $admin->row_input(T('The base URL of the tracker. This is used when creating external links to the tracker. <strong>Be sure that this does not end in a trailing slash ("/").</strong><br />Example: http://www.bluestatic.org/bugs'), 'setting[trackerurl]', $bugsys->options['trackerurl']);
+ $admin->row_input(T('The base URL of the tracker. This is used when creating external links to the tracker. <strong>Be sure that this does not end in a trailing slash ("/").</strong><br />Example: http://www.bluestatic.org/bugs'), 'setting[trackerurl]', bugdar::$options['trackerurl']);
// dateformat
$admin->row_span(T('Date Format'), 'thead');
- $admin->row_input(T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.'), 'setting[dateformat]', $bugsys->options['dateformat']);
+ $admin->row_input(T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.'), 'setting[dateformat]', bugdar::$options['dateformat']);
// defaulttimezone
$admin->row_span(T('Default Time Zone'), 'thead');
- $admin->row_text(T('This controls the time zone that all unregistered users view the tracker with.'), construct_option_select('setting[defaulttimezone]', $bugsys->datef->fetch_timezone_list(), $bugsys->options['defaulttimezone']), $bugsys->options['defaulttimezone']);
+ $admin->row_text(T('This controls the time zone that all unregistered users view the tracker with.'), construct_option_select('setting[defaulttimezone]', $bugsys->datef->fetch_timezone_list(), bugdar::$options['defaulttimezone']), bugdar::$options['defaulttimezone']);
// 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]', $bugsys->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'], bugdar::$options['defaultlanguage'], 'languageid', 'title'), bugdar::$options['defaultlanguage']);
// syndicateditems
$admin->row_span(T('Number of Syndicated Items'), 'thead');
- $admin->row_input(T('The number of bugs to be syndicated at any one time by the Atom XML feed.'), 'setting[syndicateditems]', $bugsys->options['syndicateditems']);
+ $admin->row_input(T('The number of bugs to be syndicated at any one time by the Atom XML feed.'), 'setting[syndicateditems]', bugdar::$options['syndicateditems']);
// redirectheaders
$admin->row_span(T('Use Header Redirects'), 'thead');
- $admin->row_yesno(T('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.'), 'setting[redirectheaders]', $bugsys->options['redirectheaders']);
+ $admin->row_yesno(T('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.'), 'setting[redirectheaders]', bugdar::$options['redirectheaders']);
$admin->table_end();
// allowhtml
$admin->row_span(T('Allow HTML in Bug Reports'), 'thead');
- $admin->row_yesno(T('Set this to <em>yes</em> if you want to allow users to post raw HTML in their bug reports. This is <strong>very</strong> dangerous and it is not recommended.'), 'setting[allowhtml]', $bugsys->options['allowhtml']);
+ $admin->row_yesno(T('Set this to <em>yes</em> if you want to allow users to post raw HTML in their bug reports. This is <strong>very</strong> dangerous and it is not recommended.'), 'setting[allowhtml]', bugdar::$options['allowhtml']);
// 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]', $bugsys->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'], bugdar::$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]', $bugsys->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'], bugdar::$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]', $bugsys->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'], bugdar::$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]', $bugsys->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'], bugdar::$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 <em>Not Selected</em>.'), construct_option_select('setting[defaultassign]', $bugsys->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 <em>Not Selected</em>.'), construct_option_select('setting[defaultassign]', bugdar::$datastore['assignto'], bugdar::$options['defaultassign'], 'userid', 'displayname', 0));
// defaultcomment
$admin->row_span(T('Default Comment Text'), 'thead');
- $admin->row_textarea(T('If you wish to set a template for entering the initial comment of a bug report, then you may specify this here. However, the template will only take effect on the initial report/comment. Note: the template cannot be forced on the user as there is no way to validate it.'), 'setting[defaultcomment]', $bugsys->options['defaultcomment']);
+ $admin->row_textarea(T('If you wish to set a template for entering the initial comment of a bug report, then you may specify this here. However, the template will only take effect on the initial report/comment. Note: the template cannot be forced on the user as there is no way to validate it.'), 'setting[defaultcomment]', bugdar::$options['defaultcomment']);
$admin->table_end();
// 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]', $bugsys->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'], bugdar::$options['hidestatuses'], 'statusid', 'status', 0, true));
// defaultsortkey
$admin->row_span(T('Default Sort Column'), 'thead');
- $admin->row_text(T('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.'), construct_option_select('setting[defaultsortkey]', ListSorter::fetch_by_text(false, false), $bugsys->options['defaultsortkey']));
+ $admin->row_text(T('Select the column to sort bugs by on listings. This is only a default setting which users can override in their preferences.'), construct_option_select('setting[defaultsortkey]', ListSorter::fetch_by_text(false, false), bugdar::$options['defaultsortkey']));
// defaultsortas
$admin->row_span(T('Default Sort Direction'), 'thead');
- $admin->row_text(T('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'), construct_option_select('setting[defaultsortas]', ListSorter::fetch_as_text(false), $bugsys->options['defaultsortas']));
+ $admin->row_text(T('Specify the default direction to sort bugs in the selected column. This works with and follows the same rules as the Sort Column.'), construct_option_select('setting[defaultsortas]', ListSorter::fetch_as_text(false), bugdar::$options['defaultsortas']));
// columnoptions
$admin->row_span(T('Default Column Ordering Options'), 'thead');
// defaultpp
$admin->row_span(T('Default Per-Page Amount'), 'thead');
- $admin->row_input(T('The number of items (e.g. bugs) to be displayed on a page by default. The user will have the option of over-riding these values.'), 'setting[defaultpp]', $bugsys->options['defaultpp']);
+ $admin->row_input(T('The number of items (e.g. bugs) to be displayed on a page by default. The user will have the option of over-riding these values.'), 'setting[defaultpp]', bugdar::$options['defaultpp']);
// maxpp
$admin->row_span(T('Maximum Per-Page Value'), 'thead');
- $admin->row_input(T('To prevent your server from experiencing load problems, set the maximum per page limit. Specifying a value here will make sure any user-entered value will not be higher than this, preventing server load problems.'), 'setting[maxpp]', $bugsys->options['maxpp']);
+ $admin->row_input(T('To prevent your server from experiencing load problems, set the maximum per page limit. Specifying a value here will make sure any user-entered value will not be higher than this, preventing server load problems.'), 'setting[maxpp]', bugdar::$options['maxpp']);
// pagelinks
$admin->row_span(T('Number of Page Links'), 'thead');
- $admin->row_input(T('The number of pages that will appear in the page navigation system on either side of the current page. Set this to 0 to display all pages.'), 'setting[pagelinks]', $bugsys->options['pagelinks']);
+ $admin->row_input(T('The number of pages that will appear in the page navigation system on either side of the current page. Set this to 0 to display all pages.'), 'setting[pagelinks]', bugdar::$options['pagelinks']);
$admin->table_end();
// trackerversion
$admin->row_span('Version Number', 'thead');
- $admin->row_input('Version Number', 'setting[trackerversion]', $bugsys->options['trackerversion']);
+ $admin->row_input('Version Number', 'setting[trackerversion]', bugdar::$options['trackerversion']);
$admin->row_span('Custom Gettext Localizer', 'thead');
- $admin->row_yesno('Use the custom MOReader implementation rather than the built-in Gettext extension.', 'setting[devgettext]', $bugsys->options['devgettext']);
+ $admin->row_yesno('Use the custom MOReader implementation rather than the built-in Gettext extension.', 'setting[devgettext]', bugdar::$options['devgettext']);
}
// ###################################################################
// ###################################################################
/**
-* Helper function for the $bugsys->options['columnoptions'] setting
+* Helper function for the bugdar::$options['columnoptions'] setting
*
* @return string Setting HTML code
*/
require_once('./includes/class_sort.php');
- $array = ($bugsys->options['columnoptions'] == null ? array('bugid' => 1, 'summary' => 2, 'userid' => 2, 'product' => 3, 'version' => 3, 'component' => 0, 'status' => 4, 'resolution' => 4, 'priority' => 5, 'severity' => 5, 'lastpost' => 6, 'votes' => 0) : $bugsys->options['columnoptions']);
+ $array = (bugdar::$options['columnoptions'] == null ? array('bugid' => 1, 'summary' => 2, 'userid' => 2, 'product' => 3, 'version' => 3, 'component' => 0, 'status' => 4, 'resolution' => 4, 'priority' => 5, 'severity' => 5, 'lastpost' => 6, 'votes' => 0) : bugdar::$options['columnoptions']);
$return = '<table cellspacing="2" cellpadding="1" border="0">';
foreach (ListSorter::fetch_by_text(false, false) AS $column => $name)
$admin->row_input(T('Email'), 'email', $user->objdata['email']);
$admin->row_input(($add ? T('Password') : T('Password (Leave blank for no change)')), 'password');
- foreach ($bugsys->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 ($bugsys->datastore['usergroup'] AS $id => $group)
+ foreach (bugdar::$datastore['usergroup'] AS $id => $group)
{
if ($id == $user->objdata['usergroupid'])
{
$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 ($bugsys->datastore['language'] AS $language)
+ foreach (bugdar::$datastore['language'] AS $language)
{
$admin->list_item($language['title'], $language['languageid'], ($user->objdata['languageid'] == $language['languageid']));
}
$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', $bugsys->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']));
$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', $bugsys->datastore['language'][$bugsys->options['defaultlanguage']]['langcode']));
+ $tpl = $template->fetch(FetchEmailPath('accountapproved.xml', bugdar::$datastore['language'][bugdar::$options['defaultlanguage']]['langcode']));
eval('$email = "' . $tpl . '";');
$email = $bugsys->xml->parse($email);
$mail->setSubject($email['email']['subject']['value']);
{
$admin->row_multi_item(array(
'<a href="user.php?do=edit&userid=' . $user['userid'] . '">' . $user['email'] . '</a>' => 'l',
- $bugsys->datastore['usergroup']["$user[usergroupid]"]['title'] => 'c',
+ bugdar::$datastore['usergroup']["$user[usergroupid]"]['title'] => 'c',
'<input name="approve[' . $user['userid'] . ']" type="checkbox" value="1" />' => 'c'
));
}
$attachapi->set('mimetype', $FILE['type']);
$attachapi->set('filesize', $FILE['size']);
$attachapi->set('description', $bugsys->in['description']);
- $attachapi->set('userid', $bugsys->userinfo['userid']);
+ $attachapi->set('userid', bugdar::$userinfo['userid']);
// insert an attachment
if (!$message->hasErrors())
{
$comment = new CommentAPI($bugsys);
$comment->set('bugid', $bugsys->in['bugid']);
- $comment->set('userid', $bugsys->userinfo['userid']);
+ $comment->set('userid', bugdar::$userinfo['userid']);
$comment->set('comment', $bugsys->in['comment']);
$comment->set('dateline', $attachapi->values['dateline']);
$comment->insert();
}
// update the last post data
- $db->query("UPDATE " . TABLE_PREFIX . "bug SET lastposttime = " . $attachapi->values['dateline'] . ", hiddenlastposttime = " . $attachapi->values['dateline'] . ", lastpostby = " . $bugsys->userinfo['userid'] . ", hiddenlastpostby = " . $bugsys->userinfo['userid'] . " WHERE bugid = $bug[bugid]");
+ $db->query("UPDATE " . TABLE_PREFIX . "bug SET lastposttime = " . $attachapi->values['dateline'] . ", hiddenlastposttime = " . $attachapi->values['dateline'] . ", lastpostby = " . bugdar::$userinfo['userid'] . ", hiddenlastpostby = " . bugdar::$userinfo['userid'] . " WHERE bugid = $bug[bugid]");
$notif->finalize();
if ($_POST['do'] == 'update')
{
- if (!(can_perform('caneditattach', $bug['product']) OR ($attachment['userid'] == $bugsys->userinfo['userid'] AND can_perform('canputattach', $bug['product']))))
+ if (!(can_perform('caneditattach', $bug['product']) OR ($attachment['userid'] == bugdar::$userinfo['userid'] AND can_perform('canputattach', $bug['product']))))
{
$message->errorPermission();
}
if ($_REQUEST['do'] == 'edit')
{
- if (!(can_perform('caneditattach', $bug['product']) OR ($attachment['userid'] == $bugsys->userinfo['userid'] AND can_perform('canputattach', $bug['product']))))
+ if (!(can_perform('caneditattach', $bug['product']) OR ($attachment['userid'] == bugdar::$userinfo['userid'] AND can_perform('canputattach', $bug['product']))))
{
$message->errorPermission();
}
$bug = new BugAPI($bugsys);
$comment = new CommentAPI($bugsys);
- $bug->set('userid', $bugsys->userinfo['userid']);
- $bug->set('username', $bugsys->userinfo['displayname']);
+ $bug->set('userid', bugdar::$userinfo['userid']);
+ $bug->set('username', bugdar::$userinfo['displayname']);
$bug->set('summary', 'AUTO POPULATE: ' . $i);
$bug->set('severity', 1);
- $comment->set('userid', $bugsys->userinfo['userid']);
+ $comment->set('userid', bugdar::$userinfo['userid']);
$comment->set('comment', $funct->rand(100));
- $bug->set('priority', $bugsys->options['defaultpriority']);
- $bug->set('status', $bugsys->options['defaultstatus']);
- $bug->set('resolution', $bugsys->options['defaultresolve']);
- $bug->set('assignedto', $bugsys->options['defaultassign']);
+ $bug->set('priority', bugdar::$options['defaultpriority']);
+ $bug->set('status', bugdar::$options['defaultstatus']);
+ $bug->set('resolution', bugdar::$options['defaultresolve']);
+ $bug->set('assignedto', bugdar::$options['defaultassign']);
$bug->set('product', 6);
$bug->set('component', 0);
$bug->set('dateline', $comment->values['dateline']);
$bug->set('initialreport', $comment->insertid);
$bug->set('lastposttime', $comment->values['dateline']);
- $bug->set('lastpostby', $bugsys->userinfo['userid']);
- $bug->set('lastpostbyname', $bugsys->userinfo['displayname']);
+ $bug->set('lastpostby', bugdar::$userinfo['userid']);
+ $bug->set('lastpostbyname', bugdar::$userinfo['displayname']);
$bug->set('hiddenlastposttime', $comment->values['dateline']);
- $bug->set('hiddenlastpostby', $bugsys->userinfo['userid']);
- $bug->set('hiddenlastpostbyname', $bugsys->userinfo['displayname']);
+ $bug->set('hiddenlastpostby', bugdar::$userinfo['userid']);
+ $bug->set('hiddenlastpostbyname', bugdar::$userinfo['displayname']);
$bug->update();
}
if ($_POST['do'] == 'update')
{
- if (!((can_perform('caneditownreply', $bug['product']) AND $bugsys->userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['product']) AND $bugsys->userinfo['userid'] != $comment['userid'])))
+ if (!((can_perform('caneditownreply', $bug['product']) AND bugdar::$userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['product']) AND bugdar::$userinfo['userid'] != $comment['userid'])))
{
$message->errorPermission();
}
if ($_REQUEST['do'] == 'edit')
{
- if (!((can_perform('caneditownreply', $bug['product']) AND $bugsys->userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['product']) AND $bugsys->userinfo['userid'] != $comment['userid'])))
+ if (!((can_perform('caneditownreply', $bug['product']) AND bugdar::$userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['product']) AND bugdar::$userinfo['userid'] != $comment['userid'])))
{
$message->errorPermission();
}
- $comment['posttime'] = $datef->format($bugsys->options['dateformat'], $comment['dateline']);
+ $comment['posttime'] = $datef->format(bugdar::$options['dateformat'], $comment['dateline']);
if ($comment['userid'])
{
$commenter = new UserAPI($bugsys);
if ($_POST['do'] == 'update')
{
- if (!((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid'])) AND !can_perform('canpostcomments', $bug['product']))
+ if (!((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid'])) AND !can_perform('canpostcomments', $bug['product']))
{
$message->errorPermission();
}
$comment = new CommentAPI($bugsys);
$comment->set('bugid', $bugsys->in['bugid']);
- $comment->set('userid', $bugsys->userinfo['userid']);
+ $comment->set('userid', bugdar::$userinfo['userid']);
$comment->set('comment', $commenttext);
$comment->set('parselinks', $bugsys->in['parselinks']);
$comment->insert();
$notif->send_new_comment_notice($comment->values);
$bugapi->set('lastposttime', $comment->values['dateline']);
- $bugapi->set('lastpostby', $bugsys->userinfo['userid']);
- $bugapi->set('lastpostbyname', $bugsys->userinfo['displayname']);
+ $bugapi->set('lastpostby', bugdar::$userinfo['userid']);
+ $bugapi->set('lastpostbyname', bugdar::$userinfo['displayname']);
$bugapi->set('hiddenlastposttime', $comment->values['dateline']);
- $bugapi->set('hiddenlastpostby', $bugsys->userinfo['userid']);
- $bugapi->set('hiddenlastpostbyname', $bugsys->userinfo['displayname']);
+ $bugapi->set('hiddenlastpostby', bugdar::$userinfo['userid']);
+ $bugapi->set('hiddenlastpostbyname', bugdar::$userinfo['displayname']);
- if (!((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid'])))
+ if (!((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid'])))
{
$bugapi->update();
$notif->finalize();
$dependencies = preg_split('#([^0-9].*?)#', $bugsys->in['dependency'], -1, PREG_SPLIT_NO_EMPTY);
$dependencies = ((sizeof($dependencies) < 1) ? '' : implode(', ', $dependencies));
- if ((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid']))
+ if ((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid']))
{
$bugapi->set('summary', $bugsys->in['summary']);
$bugapi->set('severity', $bugsys->in['severity']);
if ($_REQUEST['do'] == 'products')
{
- if (!is_array($bugsys->datastore['product']))
+ if (!is_array(bugdar::$datastore['product']))
{
$message->error(T('There are no products set up.'));
}
- foreach ($bugsys->datastore['product'] AS $product)
+ foreach (bugdar::$datastore['product'] AS $product)
{
if ($product['parentid'])
{
}
}
- foreach ($bugsys->datastore['version'] AS $version)
+ foreach (bugdar::$datastore['version'] AS $version)
{
$versions["$version[productid]"]["$version[versionid]"] = $version;
}
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE (permission.mask = 2 OR permission.mask = 1)
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN ({bugdar::$userinfo['usergroupid']}" . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
GROUP BY (bugfield.fieldid)
");
while ($field = $bugsys->db->fetch_array($fields_fetch))
$fields["$field[fieldid]"] = $field;
}
- if (is_array($bugsys->datastore['automation']))
+ if (is_array(bugdar::$datastore['automation']))
{
- foreach ($bugsys->datastore['automation'] AS $automation)
+ foreach (bugdar::$datastore['automation'] AS $automation)
{
$automation['fieldchanges'] = unserialize($automation['fieldchanges']);
foreach ($automation['fieldchanges']['builtin'] AS $name => $value)
{
$left = $name;
- $right = $bugsys->datastore["$left"]["$value"]["$left"];
+ $right = bugdar::$datastore["$left"]["$value"]["$left"];
eval('$automations .= "' . $template->fetch('explain_row') . '";');
}
}
$message->errorPermission();
}
- if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']))
+ if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']))
{
- $db->query("DELETE FROM " . TABLE_PREFIX . "favorite WHERE userid = " . $bugsys->userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']);
+ $db->query("DELETE FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid'] . " AND bugid = " . $bugsys->in['bugid']);
$message->redirect(T('This bug has been removed from your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
}
else
{
- $db->query("INSERT INTO " . TABLE_PREFIX . "favorite (userid, bugid) VALUES (" . $bugsys->userinfo['userid'] . ", " . $bugsys->in['bugid'] . ")");
+ $db->query("INSERT INTO " . TABLE_PREFIX . "favorite (userid, bugid) VALUES (" . bugdar::$userinfo['userid'] . ", " . $bugsys->in['bugid'] . ")");
$message->redirect(T('This bug has been added to your favorites list.'), "showreport.php?bugid=" . $bugsys->in['bugid']);
}
}
SELECT favorite.bugid, bug.* FROM " . TABLE_PREFIX . "favorite AS favorite
RIGHT JOIN " . TABLE_PREFIX . "bug AS bug
ON (favorite.bugid = bug.bugid)
- WHERE favorite.userid = " . $bugsys->userinfo['userid'] . "
- AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? " OR (bug.hidden AND bug.userid = " . $bugsys->userinfo['userid'] . " AND bug.product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ")
+ WHERE favorite.userid = " . bugdar::$userinfo['userid'] . "
+ AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? " OR (bug.hidden AND bug.userid = " . bugdar::$userinfo['userid'] . " AND bug.product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ")
");
if ($db->num_rows($favorites) < 1)
// global template variables
$datetime = $datef->format('l, F j, Y g:i A');
$year = $datef->format('Y');
-$version = $bugsys->options['trackerversion'];
+$version = bugdar::$options['trackerversion'];
$show = array(
'admin' => can_perform('canadminpanel'),
require_once('./global.php');
-if (!$bugsys->in['topic'] OR !isset($bugsys->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 = $bugsys->datastore['help'][ $bugsys->in['topic'] ];
+ $topic = bugdar::$datastore['help'][ $bugsys->in['topic'] ];
$topic['body'] = nl2br($topic['body']);
}
(bugid, attachmentid, commentid, dateline, userid, field, original, changed)
VALUES
(" . $bugsys->clean($this->bugid, TYPE_UINT) . ", " . $bugsys->clean($this->attachmentid, TYPE_UINT) . ",
- " . $bugsys->clean($this->commentid, TYPE_UINT) . ", " . TIMENOW . ", " . $bugsys->userinfo['userid'] . ",
+ " . $bugsys->clean($this->commentid, TYPE_UINT) . ", " . TIMENOW . ", " . bugdar::$userinfo['userid'] . ",
'" . $bugsys->db->escape_string($field) . "', '" . $bugsys->db->escape_string($values['old']) . "',
'" . $bugsys->db->escape_string($values['new']) . "'
)
global $bugsys;
global $doctype, $header, $headinclude, $footer, $focus, $show, $stylevar;
- if ($bugsys->options['redirectheaders'])
+ if (bugdar::$options['redirectheaders'])
{
header("Location: $url");
exit;
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE (permission.mask = 2 OR permission.mask = 1)
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN (" . bugdar::$userinfo['usergroupid'] . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
GROUP BY (bugfield.fieldid)
");
}
if ($userinfo == null)
{
- $userinfo =& $bugsys->userinfo;
+ $userinfo =& bugdar::$userinfo;
}
- $permissions =& $bugsys->datastore['permission'];
+ $permissions =& bugdar::$datastore['permission'];
if (!isset($bugsys->permissions["$bitmask"]))
{
}
}
- foreach ($bugsys->datastore["$datastore"] AS $item)
+ foreach (bugdar::$datastore["$datastore"] AS $item)
{
$label = $item["$labelname"];
$value = $item["$valuename"];
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE (permission.mask = 2 OR permission.mask = 1)
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN (" . bugdar::$userinfo['usergroupid'] . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
GROUP BY (bugfield.fieldid)
");
while ($field = $bugsys->db->fetch_array($fields_fetch))
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE permission.mask = 2
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN (" . bugdar::$userinfo['usergroupid'] . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
GROUP BY (bugfield.fieldid)
");
while ($field = $bugsys->db->fetch_array($fields))
if ($userinfo == null)
{
- $userinfo =& $bugsys->userinfo;
+ $userinfo =& bugdar::$userinfo;
}
$onbits = array();
$groups[] = $usergroupid;
// product-inspecific work
- if (is_array($bugsys->datastore['product']))
+ if (is_array(bugdar::$datastore['product']))
{
foreach ($groups AS $groupid)
{
// we only need to do this so long as there's no onbits array because this isn't product specific
- if (sizeof($onbits) == 0 AND $bugsys->datastore['usergroup']["$groupid"]['permissions'] & $bugsys->permissions["$mask"])
+ if (sizeof($onbits) == 0 AND bugdar::$datastore['usergroup']["$groupid"]['permissions'] & $bugsys->permissions["$mask"])
{
- foreach ($bugsys->datastore['product'] AS $id => $product)
+ foreach (bugdar::$datastore['product'] AS $id => $product)
{
$onbits["$id"] = $id;
}
// product specific work
foreach ($groups AS $groupid)
{
- if (is_array($bugsys->datastore['permission']["$groupid"]))
+ if (is_array(bugdar::$datastore['permission']["$groupid"]))
{
- foreach ($bugsys->datastore['permission']["$groupid"] AS $productid => $bit)
+ foreach (bugdar::$datastore['permission']["$groupid"] AS $productid => $bit)
{
if ($bit & $bugsys->permissions["$mask"])
{
{
global $bugsys;
- if (isset($bugsys->datastore['help']["$topic"]))
+ if (isset(bugdar::$datastore['help']["$topic"]))
{
eval('$temp = "' . $bugsys->template->fetch('help_link') . '";');
return $temp;
'email' => '',
'displayname' => '',
'showcolors' => 1,
- 'permissions' => $bugsys->datastore['usergroup'][1]['permissions'],
- 'displaytitle' => $bugsys->datastore['usergroup'][1]['displaytitle'],
- 'timezone' => $bugsys->options['defaulttimezone']
+ 'permissions' => bugdar::$datastore['usergroup'][1]['permissions'],
+ 'displaytitle' => bugdar::$datastore['usergroup'][1]['displaytitle'],
+ 'timezone' => bugdar::$options['defaulttimezone']
);
}
global $bugsys;
if ($userinfo == null)
{
- $userinfo = $bugsys->userinfo;
+ $userinfo = bugdar::$userinfo;
}
$bugsys->debug("checking permissions for $userinfo[userid] on bug $bug[bugid]");
{
global $bugsys;
- $bug['hiddendisplay'] = ($bug['hidden'] AND (can_perform('canviewhidden', $bug['product']) OR (can_perform('canviewownhidden') AND $bug['userid'] == $bugsys->userinfo['userid'])));
+ $bug['hiddendisplay'] = ($bug['hidden'] AND (can_perform('canviewhidden', $bug['product']) OR (can_perform('canviewownhidden') AND $bug['userid'] == bugdar::$userinfo['userid'])));
- $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $color);
- $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title'];
- $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version'];
- $bug['component'] = $bugsys->datastore['component']["$bug[component]"]['title'];
- $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status'];
- $bug['resolution'] = $bugsys->datastore['resolution']["$bug[resolution]"]['resolution'];
- $bug['priority'] = $bugsys->datastore['priority']["$bug[priority]"]['priority'];
- $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity'];
- $bug['assignedto'] = ((empty($bug['assignedto']) OR !isset($bugsys->datastore['assignto']["$bug[assignedto]"])) ? '' : construct_user_display($bugsys->datastore['assignto']["$bug[assignedto]"]));
+ $bug['bgcolor'] = (bugdar::$userinfo['showcolors'] ? bugdar::$datastore['status']["$bug[status]"]['color'] : $color);
+ $bug['product'] = bugdar::$datastore['product']["$bug[product]"]['title'];
+ $bug['version'] = bugdar::$datastore['version']["$bug[version]"]['version'];
+ $bug['component'] = bugdar::$datastore['component']["$bug[component]"]['title'];
+ $bug['status'] = bugdar::$datastore['status']["$bug[status]"]['status'];
+ $bug['resolution'] = bugdar::$datastore['resolution']["$bug[resolution]"]['resolution'];
+ $bug['priority'] = bugdar::$datastore['priority']["$bug[priority]"]['priority'];
+ $bug['severity'] = bugdar::$datastore['severity']["$bug[severity]"]['severity'];
+ $bug['assignedto'] = ((empty($bug['assignedto']) OR !isset(bugdar::$datastore['assignto']["$bug[assignedto]"])) ? '' : construct_user_display(bugdar::$datastore['assignto']["$bug[assignedto]"]));
$bug['lastposttime'] = ($bug['hiddendisplay'] ? $bug['hiddenlastposttime'] : $bug['lastposttime']);
$bug['lastpost'] = ($bug['hiddendisplay'] ? $bug['hiddenlastpostbyname'] : $bug['lastpostbyname']);
- $bug['lastposttime'] = $bugsys->datef->format($bugsys->options['dateformat'], $bug['lastposttime']);
+ $bug['lastposttime'] = $bugsys->datef->format(bugdar::$options['dateformat'], $bug['lastposttime']);
return $bug;
}
global $bugsys;
$bugsys->load('pagination', 'pagination', true);
- $bugsys->pagination->setDefaultPerPage($bugsys->options['defaultpp']);
- $bugsys->pagination->setMaxPerPage($bugsys->options['maxpp']);
- $bugsys->pagination->setPageLinks($bugsys->options['pagelinks']);
+ $bugsys->pagination->setDefaultPerPage(bugdar::$options['defaultpp']);
+ $bugsys->pagination->setMaxPerPage(bugdar::$options['maxpp']);
+ $bugsys->pagination->setPageLinks(bugdar::$options['pagelinks']);
$bugsys->pagination->setPageVar('p');
$bugsys->pagination->setPerPageVar('pp');
$bugsys->pagination->setBitProcessor('PageNavigatorBitCallback');
{
global $bugsys;
- $perms = (int)$bugsys->datastore['usergroup']["$user[usergroupid]"]['permissions'];
+ $perms = (int)bugdar::$datastore['usergroup']["$user[usergroupid]"]['permissions'];
if (!is_array($user['groupids']))
{
- $user['groupids'] = explode(',', $bugsys->userinfo['groupids']);
+ $user['groupids'] = explode(',', bugdar::$userinfo['groupids']);
}
$user['groupids'] = BSFunctions::array_strip_empty($user['groupids']);
foreach ($user['groupids'] AS $group)
{
- $perms |= (int)$bugsys->datastore['usergroup']["$group"]['permissions'];
+ $perms |= (int)bugdar::$datastore['usergroup']["$group"]['permissions'];
}
return $perms;
VALUES ('language', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['language'] = $tempstore;
+ bugdar::$datastore['language'] = $tempstore;
}
// ####################### Start build_settings ######################
VALUES ('setting', '" . $bugsys->escape(serialize($options)) . "')"
);
- $bugsys->datastore['setting'] = $options;
+ bugdar::$datastore['setting'] = $options;
}
// ###################### Start build_usergroups #####################
VALUES ('usergroup', '" . $bugsys->escape(serialize($groups)) . "')"
);
- $bugsys->datastore['usergroup'] = $groups;
+ bugdar::$datastore['usergroup'] = $groups;
}
// ####################### Start build_statuses ######################
VALUES ('status', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['status'] = $tempstore;
+ bugdar::$datastore['status'] = $tempstore;
}
// ###################### Start build_severities #####################
VALUES ('severity', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['severity'] = $tempstore;
+ bugdar::$datastore['severity'] = $tempstore;
}
// ###################### Start build_priorities #####################
VALUES ('priority', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['priority'] = $tempstore;
+ bugdar::$datastore['priority'] = $tempstore;
}
// ###################### Start build_assignedto #####################
// determine the groups that are assignable
$ids = $exprs = array();
- foreach ($bugsys->datastore['usergroup'] AS $id => $group)
+ foreach (bugdar::$datastore['usergroup'] AS $id => $group)
{
if ($group['permissions'] & $bugsys->permissions['canbeassignedto'])
{
VALUES ('assignto', '" . $bugsys->escape(serialize($devs)) . "')"
);
- $bugsys->datastore['assignto'] = $devs;
+ bugdar::$datastore['assignto'] = $devs;
}
// ##################### Start build_resolutions #####################
VALUES ('resolution', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['resolution'] = $tempstore;
+ bugdar::$datastore['resolution'] = $tempstore;
}
// ####################### Start build_versions ######################
VALUES ('version', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['version'] = $tempstore;
+ bugdar::$datastore['version'] = $tempstore;
}
// ####################### Start build_products ######################
('component', '" . $bugsys->escape(serialize($tempstore['component'])) . "')"
);
- $bugsys->datastore['product'] = $tempstore['product'];
- $bugsys->datastore['component'] = $tempstore['component'];
+ bugdar::$datastore['product'] = $tempstore['product'];
+ bugdar::$datastore['component'] = $tempstore['component'];
}
// ##################### Start build_permissions #####################
VALUES ('permission', '" . $bugsys->escape(serialize($tempstore)) . "')"
);
- $bugsys->datastore['permission'] = $tempstore;
+ bugdar::$datastore['permission'] = $tempstore;
}
// ##################### Start build_automations ####################
VALUES ('automation', '" . $bugsys->escape(serialize($actions)) . "')"
);
- $bugsys->datastore['automation'] = $actions;
+ bugdar::$datastore['automation'] = $actions;
}
// ###################### Start build_user_help ######################
VALUES ('help', '" . $bugsys->escape(serialize($help)) . "')"
);
- $bugsys->datastore['help'] = $help;
+ bugdar::$datastore['help'] = $help;
}
/*=====================================================================*\
// index all of the components by parent and ID
$components = array();
- if (is_array($bugsys->datastore['component']))
+ if (is_array(bugdar::$datastore['component']))
{
- foreach ($bugsys->datastore['component'] AS $id => $prod)
+ foreach (bugdar::$datastore['component'] AS $id => $prod)
{
$components["$prod[parentid]"]["$id"] = $prod;
}
}
// these are products
- foreach ($bugsys->datastore['product'] AS $productid => $product)
+ foreach (bugdar::$datastore['product'] AS $productid => $product)
{
if (!can_perform($action, $product['productid']) OR !can_perform('canviewbugs', $product['productid']))
{
{
global $bugsys;
- $product = $bugsys->datastore['product']["$productid"];
+ $product = bugdar::$datastore['product']["$productid"];
$component = null;
$build = '';
// this is a component
if ($product == null)
{
- $component = $bugsys->datastore['component']["$productid"];
- $product = $bugsys->datastore['product']["$component[parentid]"];
+ $component = bugdar::$datastore['component']["$productid"];
+ $product = bugdar::$datastore['product']["$component[parentid]"];
}
- foreach ($bugsys->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)))
{
// ###################################################################
// init the big three
-$bugsys->options = array();
-$bugsys->userinfo = array();
-$bugsys->datastore = array();
+
+class bugdar
+{
+ public static $options = array();
+ public static $userinfo = array();
+ public static $datastore = array();
+}
// ###################################################################
// send nocache
foreach ($datastoretemp as $store)
{
- $bugsys->datastore["$store[title]"] = unserialize($store['data']);
+ bugdar::$datastore["$store[title]"] = unserialize($store['data']);
}
-$bugsys->options = $bugsys->datastore['setting'];
-$bugsys->options['columnoptions'] = unserialize($bugsys->options['columnoptions']);
-unset($bugsys->datastore['setting']);
+bugdar::$options = bugdar::$datastore['setting'];
+bugdar::$options['columnoptions'] = unserialize(bugdar::$options['columnoptions']);
+unset(bugdar::$datastore['setting']);
// ###################################################################
// load permissions
// ###################################################################
// load userinfo
-$authMethod = ((defined('USE_DEFAULT_AUTH_METHOD') AND constant('USE_DEFAULT_AUTH_METHOD') == 1) ? 'default' : $bugsys->options['authmethod']);
+$authMethod = ((defined('USE_DEFAULT_AUTH_METHOD') AND constant('USE_DEFAULT_AUTH_METHOD') == 1) ? 'default' : bugdar::$options['authmethod']);
require_once('./includes/auth/auth_' . $authMethod . '.php');
$authClass = 'Authentication' . str_replace(' ', '', ucwords(str_replace('_', ' ', $authMethod)));
if ($auth->authenticateCookies())
{
- $bugsys->userinfo = $auth->fetchBugdarUser();
- $bugsys->userinfo['permissions'] = FetchUserPermissions($bugsys->userinfo);
- $bugsys->userinfo['displaytitle'] = $bugsys->datastore['usergroup'][ $bugsys->userinfo['usergroupid'] ]['displaytitle'];
- $bugsys->userinfo['columnoptions'] = unserialize($bugsys->userinfo['columnoptions']);
+ bugdar::$userinfo = $auth->fetchBugdarUser();
+ bugdar::$userinfo['permissions'] = FetchUserPermissions(bugdar::$userinfo);
+ bugdar::$userinfo['displaytitle'] = bugdar::$datastore['usergroup'][ bugdar::$userinfo['usergroupid'] ]['displaytitle'];
+ bugdar::$userinfo['columnoptions'] = unserialize(bugdar::$userinfo['columnoptions']);
}
else
{
- $bugsys->userinfo = fetch_guest_user();
+ bugdar::$userinfo = fetch_guest_user();
}
// ###################################################################
$stylevar['right'] = ($language['direction'] == 'ltr' ? 'right' : 'left');
// start gettext engine
-if (!$bugsys->options['devgettext'])
+if (!bugdar::$options['devgettext'])
{
putenv("LANG=$language[langcode]");
putenv("LANGUAGE=$language[langcode]");
// initialize the date system
require_once ISSO . '/Date.php';
$datef = BSApp::$date = new BSDate();
-$datef->setUserTimeZone($bugsys->userinfo['timezone'] + ($bugsys->userinfo['usedst'] * 1));
-BSApp::debug('user tz = ' . $bugsys->userinfo['timezone'] . '; use version = ' . $datef->usertz);
+$datef->setUserTimeZone(bugdar::$userinfo['timezone'] + (bugdar::$userinfo['usedst'] * 1));
+BSApp::debug('user tz = ' . bugdar::$userinfo['timezone'] . '; use version = ' . $datef->usertz);
/*=====================================================================*\
|| ###################################################################
{
global $bugsys;
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
- $languageid = $bugsys->userinfo['languageid'];
- $language = $bugsys->datastore['language']["$languageid"];
+ $languageid = bugdar::$userinfo['languageid'];
+ $language = bugdar::$datastore['language']["$languageid"];
}
- if (!$languageid AND is_array($bugsys->datastore['language']))
+ if (!$languageid AND is_array(bugdar::$datastore['language']))
{
- foreach ($bugsys->datastore['language'] AS $language)
+ foreach (bugdar::$datastore['language'] AS $language)
{
- if ($bugsys->options['defaultlanguage'] == $language['languageid'])
+ if (bugdar::$options['defaultlanguage'] == $language['languageid'])
{
$languageid = $language['languageid'];
- $language = $bugsys->datastore['language']["$languageid"];
+ $language = bugdar::$datastore['language']["$languageid"];
break;
}
}
global $bugsys;
static $mo;
- if (!$bugsys->options['devgettext'])
+ if (!bugdar::$options['devgettext'])
{
return _($str);
}
$count = $db->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "bug
- WHERE (!hidden OR (hidden AND product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? " OR (hidden AND userid = " . $bugsys->userinfo['userid'] . " AND product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ")
- AND product IN (" . fetch_on_bits('canviewbugs') . ")" . (($bugsys->options['hidestatuses'] OR isset($bugsys->userinfo['hidestatuses'])) ? "
- AND status NOT IN (" . ($bugsys->userinfo['hidestatuses'] != '' ? $bugsys->userinfo['hidestatuses'] : $bugsys->options['hidestatuses']) . ")" : "")
+ WHERE (!hidden OR (hidden AND product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? " OR (hidden AND userid = " . bugdar::$userinfo['userid'] . " AND product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ")
+ AND product IN (" . fetch_on_bits('canviewbugs') . ")" . ((bugdar::$options['hidestatuses'] OR isset(bugdar::$userinfo['hidestatuses'])) ? "
+ AND status NOT IN (" . (bugdar::$userinfo['hidestatuses'] != '' ? bugdar::$userinfo['hidestatuses'] : bugdar::$options['hidestatuses']) . ")" : "")
);
if (!$count['count'])
// ###################################################################
// init the big three
-$bugsys->options = array();
-$bugsys->userinfo = array();
-$bugsys->datastore = array();
+bugdar::$options = array();
+bugdar::$userinfo = array();
+bugdar::$datastore = array();
// ###################################################################
<email>
- <subject>Account Approved at {$bugsys->options['trackertitle']}</subject>
+ <subject>Account Approved at {bugdar::$options['trackertitle']}</subject>
<bodyText>Hi $user[displayname],
-Your account was awaiting moderation at {$bugsys->options['trackertitle']}. Today, an administrator approved your registration and you are now able to use the bug tracker fully.
+Your account was awaiting moderation at {bugdar::$options['trackertitle']}. Today, an administrator approved your registration and you are now able to use the bug tracker fully.
If you have any questions, please don't hesitate to contact the webmaster.</bodyText>
</email>
\ No newline at end of file
<email>
- <subject>Welcome to {$bugsys->options['trackertitle']}</subject>
+ <subject>Welcome to {bugdar::$options['trackertitle']}</subject>
<bodyText>Hi {$bugsys->in['displayname']},
-Welcome to the {$bugsys->options['trackertitle']} tracker. Before you can begin posting bug reports, you'll need to activate your account. To do this, please click this link:
+Welcome to the {bugdar::$options['trackertitle']} tracker. Before you can begin posting bug reports, you'll need to activate your account. To do this, please click this link:
-{$bugsys->options['trackerurl']}/register.php?do=activate&userid=$userid&activator=$activationid</bodyText>
+{bugdar::$options['trackerurl']}/register.php?do=activate&userid=$userid&activator=$activationid</bodyText>
</email>
\ No newline at end of file
<email>
- <subject>{$bugsys->options['trackertitle']} Password Reset</subject>
+ <subject>{bugdar::$options['trackertitle']} Password Reset</subject>
<bodyText>Hi {$user->objdata['displayname']},
-You requested this lost password email at the {$bugsys->options['trackertitle']} bug tracker. To reset your password, simply click the link below (or paste it into your browser window exactly) and enter a new password.
+You requested this lost password email at the {bugdar::$options['trackertitle']} bug tracker. To reset your password, simply click the link below (or paste it into your browser window exactly) and enter a new password.
-{$bugsys->options['trackerurl']}/login.php?do=recoverpw&activator=$activator
+{bugdar::$options['trackerurl']}/login.php?do=recoverpw&activator=$activator
If you did not request this, do not worry as this notice will expire in 24 hours.</bodyText>
</email>
\ No newline at end of file
<email>
- <subject>Welcome to {$bugsys->options['trackertitle']}</subject>
+ <subject>Welcome to {bugdar::$options['trackertitle']}</subject>
<bodyText>Hi {$displayName},
-Thank you for taking the time to register at {$bugsys->options['trackertitle']}. We look forward to your contributations to making our products better.
+Thank you for taking the time to register at {bugdar::$options['trackertitle']}. We look forward to your contributations to making our products better.
If you have any questions, please don't hesitate to contact the webmaster.</bodyText>
</email>
\ No newline at end of file
// ###################################################################
-if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout')
+if (bugdar::$userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout')
{
$message->error(T('You are already logged in.'));
}
if ($_REQUEST['do'] == 'logout')
{
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
$db->query("DELETE FROM " . TABLE_PREFIX . "adminsession WHERE sessionid = '" . $bugsys->input_escape(COOKIE_PREFIX . 'adminsession') . "'");
$auth->clearCookies();
$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', $bugsys->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']);
$notif = new NotificationCenter();
- $bug->set('userid', $bugsys->userinfo['userid']);
- $bug->set('username', $bugsys->userinfo['displayname']);
+ $bug->set('userid', bugdar::$userinfo['userid']);
+ $bug->set('username', bugdar::$userinfo['displayname']);
$bug->set('summary', $bugsys->in['summary']);
$bug->set('severity', $bugsys->in['severity']);
- $comment->set('userid', $bugsys->userinfo['userid']);
+ $comment->set('userid', bugdar::$userinfo['userid']);
$comment->set('comment', $bugsys->in['comment']);
$comment->set('parselinks', $bugsys->in['parselinks']);
// check permissions on various input values
if (!can_perform('canchangestatus', $bugsys->in['product']))
{
- $bug->set('priority', $bugsys->options['defaultpriority']);
- $bug->set('status', $bugsys->options['defaultstatus']);
- $bug->set('resolution', $bugsys->options['defaultresolve']);
+ $bug->set('priority', bugdar::$options['defaultpriority']);
+ $bug->set('status', bugdar::$options['defaultstatus']);
+ $bug->set('resolution', bugdar::$options['defaultresolve']);
}
else
{
}
if (!can_perform('canassign', $bugsys->in['product']))
{
- $bug->set('assignedto', $bugsys->options['defaultassign']);
+ $bug->set('assignedto', bugdar::$options['defaultassign']);
}
else
{
$bug->set('dateline', $comment->values['dateline']);
$bug->set('initialreport', $comment->insertid);
$bug->set('lastposttime', $comment->values['dateline']);
- $bug->set('lastpostby', $bugsys->userinfo['userid']);
- $bug->set('lastpostbyname', $bugsys->userinfo['displayname']);
+ $bug->set('lastpostby', bugdar::$userinfo['userid']);
+ $bug->set('lastpostbyname', bugdar::$userinfo['displayname']);
$bug->set('hiddenlastposttime', $comment->values['dateline']);
- $bug->set('hiddenlastpostby', $bugsys->userinfo['userid']);
- $bug->set('hiddenlastpostbyname', $bugsys->userinfo['displayname']);
+ $bug->set('hiddenlastpostby', bugdar::$userinfo['userid']);
+ $bug->set('hiddenlastpostbyname', bugdar::$userinfo['displayname']);
$bug->update();
$notif->set_bug_data($bug->objdata);
if ($_REQUEST['do'] == 'add')
{
- if (!is_array($bugsys->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($bugsys->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.'));
}
- $select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', ($bugsys->in['severity'] ? $bugsys->in['severity'] : $bugsys->options['defaultseverity']));
+ $select['severity'] = construct_datastore_select('severity', 'severity', 'severityid', ($bugsys->in['severity'] ? $bugsys->in['severity'] : bugdar::$options['defaultseverity']));
$show['changestatus'] = can_perform('canchangestatus');
if (can_perform('canchangestatus'))
{
- $select['priority'] = construct_datastore_select('priority', 'priority', 'priorityid', ($bugsys->in['priority'] ? $bugsys->in['priority'] : $bugsys->options['defaultpriority']));
- $select['status'] = construct_datastore_select('status', 'status', 'statusid', ($bugsys->in['status'] ? $bugsys->in['status'] : $bugsys->options['defaultstatus']));
- $select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid', ($bugsys->in['resolution'] ? $bugsys->in['resolution'] : $bugsys->options['defaultresolve']));
+ $select['priority'] = construct_datastore_select('priority', 'priority', 'priorityid', ($bugsys->in['priority'] ? $bugsys->in['priority'] : bugdar::$options['defaultpriority']));
+ $select['status'] = construct_datastore_select('status', 'status', 'statusid', ($bugsys->in['status'] ? $bugsys->in['status'] : bugdar::$options['defaultstatus']));
+ $select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid', ($bugsys->in['resolution'] ? $bugsys->in['resolution'] : bugdar::$options['defaultresolve']));
}
$show['assign'] = can_perform('canassign');
if (can_perform('canassign'))
{
- foreach ($bugsys->datastore['assignto'] AS $dev)
+ foreach (bugdar::$datastore['assignto'] AS $dev)
{
$value = $dev['userid'];
$label = construct_user_display($dev, false);
- $selected = ($bugsys->in['assignedto'] ? ($bugsys->in['assignedto'] == $dev['userid']) : ($dev['userid'] == $bugsys->options['defaultassign']));
+ $selected = ($bugsys->in['assignedto'] ? ($bugsys->in['assignedto'] == $dev['userid']) : ($dev['userid'] == bugdar::$options['defaultassign']));
eval('$select[dev] .= "' . $template->fetch('selectoption') . '";');
}
}
$productSelect = ConstructProductSelect('cansubmitbugs', $bugsys->in['product'], false);
- $reporter = construct_user_display($bugsys->userinfo);
+ $reporter = construct_user_display(bugdar::$userinfo);
eval('$template->flush("' . $template->fetch('newreport') . '");');
}
if ($_POST['do'] == 'insert')
{
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
$message->error(T('Sorry, you are already registered.'));
}
- if (!$bugsys->options['allownewreg'])
+ if (!bugdar::$options['allownewreg'])
{
$message->error(T('Sorry, we don\'t allow new registrations.'));
}
$message->addError(T('The passwords you entered did not match.'));
}
- if ($bugsys->options['verifyemail'])
+ if (bugdar::$options['verifyemail'])
{
$usergroupid = 3;
}
else
{
- if ($bugsys->options['moderatenewusers'])
+ if (bugdar::$options['moderatenewusers'])
{
$usergroupid = 4;
}
$user->set('showemail', $bugsys->in['showemail']);
$user->set('showcolors', 1);
$user->set('languageid', $bugsys->in['languageid']);
- $user->set('timezone', $bugsys->options['defaulttimezone']);
+ $user->set('timezone', bugdar::$options['defaulttimezone']);
$user->set('usergroupid', $usergroupid);
if (!$message->hasErrors())
$db->query("INSERT INTO " . TABLE_PREFIX . "useractivation (userid, activator, dateline, usergroupid) VALUES ($userid, '$activationid', " . TIMENOW . ", 2)");
- eval('$email = "' . $template->fetch(FetchEmailPath('activateaccount.xml', $bugsys->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']);
}
else if ($usergroupid == 4 OR $usergroupid == 2)
{
- if ($bugsys->options['sendwelcomemail'])
+ if (bugdar::$options['sendwelcomemail'])
{
$displayName = $bugsys->in['displayname'];
- eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', $bugsys->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']);
if (empty($_REQUEST['do']))
{
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
$message->error(T('Sorry, you are already registered.'));
}
- if (!$bugsys->options['allownewreg'])
+ if (!bugdar::$options['allownewreg'])
{
$message->error(T('Sorry, we don\'t allow new registrations.'));
}
- foreach ($bugsys->datastore['language'] AS $value => $temp)
+ foreach (bugdar::$datastore['language'] AS $value => $temp)
{
$label = $temp['title'];
$selected = ($value == $bugsys->in['languageid']);
$db->query("UPDATE " . TABLE_PREFIX . "user SET usergroupid = $useractivation[usergroupid] WHERE userid = " . $bugsys->in['userid']);
$db->query("DELETE FROM " . TABLE_PREFIX . "useractivation WHERE userid = " . $bugsys->in['userid']);
- if ($bugsys->options['sendwelcomemail'])
+ if (bugdar::$options['sendwelcomemail'])
{
$displayName = $user['displayname'];
- eval('$email = "' . $template->fetch(FetchEmailPath('welcome.xml', $bugsys->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']);
}
else if ($bugsys->in['searchid'])
{
- $cachedsearch = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $cachedsearch = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
}
- else if ($bugsys->userinfo['userid'])
+ else if (bugdar::$userinfo['userid'])
{
- $cachedsearch = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NULL AND userid = " . $bugsys->userinfo['userid']);
+ $cachedsearch = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NULL AND userid = " . bugdar::$userinfo['userid']);
}
else
{
if ($newsearch)
{
- if (!is_array($bugsys->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($bugsys->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.'));
}
$select['resolution'] = construct_datastore_select('resolution', 'resolution', 'resolutionid');
$searches = '';
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
- $searchesFetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NOT NULL AND userid = " . $bugsys->userinfo['userid']);
+ $searchesFetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NOT NULL AND userid = " . bugdar::$userinfo['userid']);
while ($search = $db->fetch_array($searchesFetch))
{
$value = $search['searchid'];
}
$select['dev'] = '';
- foreach ($bugsys->datastore['assignto'] AS $dev)
+ foreach (bugdar::$datastore['assignto'] AS $dev)
{
$value = $dev['userid'];
$label = construct_user_display($dev, false);
// -------------------------------------------------------------------
// favorites
$bugsys->input_clean('favorite', TYPE_INT);
- if ($bugsys->in['favorite'] != 0 AND $bugsys->userinfo['userid'])
+ if ($bugsys->in['favorite'] != 0 AND bugdar::$userinfo['userid'])
{
- $favorites = $db->query("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . $bugsys->userinfo['userid']);
+ $favorites = $db->query("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE userid = " . bugdar::$userinfo['userid']);
while ($favorite = $db->fetch_array($favorites))
{
$ids[] = $favorite['bugid'];
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE mask <> 0
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN ({bugdar::$userinfo['usergroupid']}" . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
AND bugfield.cansearch = 1
GROUP BY (bugfield.fieldid)"
);
OR
(bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? "
OR
- (bug.hidden AND bug.userid = " . $bugsys->userinfo['userid'] . " AND bug.product IN (" . fetch_on_bits('canviewonhidden') . "))" : "") . "
+ (bug.hidden AND bug.userid = " . bugdar::$userinfo['userid'] . " AND bug.product IN (" . fetch_on_bits('canviewonhidden') . "))" : "") . "
)
" . implode("\n\t\t", $querybuild) . "
GROUP BY bug.bugid
$results[] = $result;
}
- if ($bugsys->userinfo['userid'] AND !$cachedsearch AND !$bugsys->in['rerun'])
+ if (bugdar::$userinfo['userid'] AND !$cachedsearch AND !$bugsys->in['rerun'])
{
- $db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE userid = " . $bugsys->userinfo['userid'] . " AND name IS NULL");
+ $db->query("DELETE FROM " . TABLE_PREFIX . "search WHERE userid = " . bugdar::$userinfo['userid'] . " AND name IS NULL");
}
// store the search params
INSERT INTO " . TABLE_PREFIX . "search
(userid, dateline, query, ids, orderby, hilight, resultcount)
VALUES
- (" . $bugsys->userinfo['userid'] . ",
+ (" . bugdar::$userinfo['userid'] . ",
" . TIMENOW . ", '" . $bugsys->escape(serialize($params)) . "',
'" . implode(',', $ids) . "', '" . $bugsys->escape($sortclause) . "',
'" . $bugsys->escape($hilight) . "',
if ($_REQUEST['do'] == 'update')
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
if (!$search OR !can_perform('caneditother'))
{
$message->errorPermission();
$selected = true;
eval('$select[dev] .= "' . $template->fetch('selectoption') . '";');
$selected = false;
- foreach ($bugsys->datastore['assignto'] AS $dev)
+ foreach (bugdar::$datastore['assignto'] AS $dev)
{
$value = $dev['userid'];
$label = construct_user_display($dev, false);
if ($_POST['do'] == 'doupdate')
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
if (!$search OR !can_perform('caneditother'))
{
$message->errorPermission();
(
product IN (" . fetch_on_bits('caneditother') . ")
OR
- (userid = " . $bugsys->userinfo['userid'] . " AND product IN (" . fetch_on_bits('caneditown') . "))
+ (userid = " . bugdar::$userinfo['userid'] . " AND product IN (" . fetch_on_bits('caneditown') . "))
)
");
while ($bug = $db->fetch_array($bugs))
{
- if (!((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid'])) AND !can_perform('canpostcomments', $bug['product']))
+ if (!((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid']) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid'])) AND !can_perform('canpostcomments', $bug['product']))
{
continue;
}
if ($_REQUEST['do'] == 'export')
{
- if (!$bugsys->in['searchid'] AND $bugsys->userinfo['userid'])
+ if (!$bugsys->in['searchid'] AND bugdar::$userinfo['userid'])
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NULL AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NULL AND userid = " . bugdar::$userinfo['userid']);
}
else if ($bugsys->in['searchid'])
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
}
else
{
$xml = '<?xml version="1.0" encoding="' . $language['charset'] . '"?>
-<bugdarExport user="' . $bugsys->unsanitize(construct_user_display($bugsys->userinfo, false)) . '" date="' . $datef->format('r', TIMENOW) . '" searchid="' . $search['searchid'] . '">';
+<bugdarExport user="' . $bugsys->unsanitize(construct_user_display(bugdar::$userinfo, false)) . '" date="' . $datef->format('r', TIMENOW) . '" searchid="' . $search['searchid'] . '">';
while ($bug = $db->fetch_array($bugs))
{
$xml .= "\n\t\t<status>" . $bug['status'] . "</status>";
if ($bug['assignedto'])
{
- $xml .= "\n\t\t<assignedTo>" . construct_user_display($bugsys->datastore['assignto']["$bug[assignedto]"], false) . "</assignedTo>";
+ $xml .= "\n\t\t<assignedTo>" . construct_user_display(bugdar::$datastore['assignto']["$bug[assignedto]"], false) . "</assignedTo>";
}
$xml .= "\n\t\t<resolution>" . $bug['resolution'] . "</resolution>";
$xml .= "\n\t\t<severity>" . $bug['severity'] . "</severity>";
if ($_POST['do'] == 'dosave')
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
if (!$search)
{
$message->addError(T('The search does not exist.'));
if ($_REQUEST['do'] == 'save')
{
- if (!$bugsys->userinfo['userid'])
+ if (!bugdar::$userinfo['userid'])
{
$message->errorPermission();
}
$sort = new ListSorter('search');
- $show['save'] = ($bugsys->userinfo['userid'] AND !$search['name']);
+ $show['save'] = (bugdar::$userinfo['userid'] AND !$search['name']);
$show['update'] = can_perform('caneditother');
$bugs = '';
LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission
ON (bugfield.fieldid = permission.fieldid)
WHERE mask <> 0
- AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ")
+ AND permission.usergroupid IN ({bugdar::$userinfo['usergroupid']}" . (sizeof(bugdar::$userinfo['groupids']) != 0 ? ',' . implode(',', bugdar::$userinfo['groupids']) : '') . ")
GROUP BY (bugfield.fieldid)"
);
);
while ($log = $db->fetch_array($logs_fetch))
{
- $log['date'] = $datef->format($bugsys->options['dateformat'], $log['dateline']);
+ $log['date'] = $datef->format(bugdar::$options['dateformat'], $log['dateline']);
$log['user'] = construct_user_display($log);
$logs["$log[dateline]"]["$log[historyid]"] = $log;
if (isset($lookupfields["$matches[1]"]))
{
$lookup = $matches[1];
- $log['original'] = $bugsys->datastore["$lookup"]["$log[original]"][ $lookupfields["$lookup"] ];
- $log['changed'] = $bugsys->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')
{
$message->errorPermission();
}
-$show['edit'] = ((can_perform('caneditown', $bug['product']) AND $bugsys->userinfo['userid'] == $bug['userid'] AND $bug['userid'] != 0) OR (can_perform('caneditother', $bug['product']) AND $bugsys->userinfo['userid'] != $bug['userid']));
+$show['edit'] = ((can_perform('caneditown', $bug['product']) AND bugdar::$userinfo['userid'] == $bug['userid'] AND $bug['userid'] != 0) OR (can_perform('caneditother', $bug['product']) AND bugdar::$userinfo['userid'] != $bug['userid']));
$show['delete'] = can_perform('candeletedata', $bug['product']);
// ###################################################################
}
else
{
- $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status'];
- $bug['resolution'] = $bugsys->datastore['resolution']["$bug[resolution]"]['resolution'];
- $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity'];
- $bug['priority'] = $bugsys->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($bugsys->datastore['assignto']))
+ if (can_perform('canassign', $bug['product']) AND is_array(bugdar::$datastore['assignto']))
{
- foreach ($bugsys->datastore['assignto'] AS $dev)
+ foreach (bugdar::$datastore['assignto'] AS $dev)
{
$value = $dev['userid'];
$selected = (($dev['userid'] == $bug['assignedto']) ? true : false);
$select['automations'] = '';
$show['automations'] = false;
- if (is_array($bugsys->datastore['automation']))
+ if (is_array(bugdar::$datastore['automation']))
{
- foreach ($bugsys->datastore['automation'] AS $action)
+ foreach (bugdar::$datastore['automation'] AS $action)
{
$label = $action['name'];
$value = $action['actionid'];
{
// -------------------------------------------------------------------
// prep display
- $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status'];
- $bug['resolution'] = $bugsys->datastore['resolution']["$bug[resolution]"]['resolution'];
- $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity'];
- $bug['priority'] = $bugsys->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 = $bugsys->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]");
$show['subscribe'] = can_perform('cansubscribe', $bug['product']);
-$favorite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE bugid = $bug[bugid] AND userid = " . $bugsys->userinfo['userid']);
+$favorite = (bool)$db->query_first("SELECT * FROM " . TABLE_PREFIX . "favorite WHERE bugid = $bug[bugid] AND userid = " . bugdar::$userinfo['userid']);
$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['datetime'] = $datef->format(bugdar::$options['dateformat'], $bug['dateline']);
$bug['productid'] = $bug['product'];
-$bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title'];
+$bug['product'] = bugdar::$datastore['product']["$bug[product]"]['title'];
$bug['componentid'] = $bug['component'];
-$bug['component'] = ($bug['component'] ? $bugsys->datastore['product']["$bug[component]"]['title'] : '');
+$bug['component'] = ($bug['component'] ? bugdar::$datastore['product']["$bug[component]"]['title'] : '');
$bug['versionid'] = $bug['version'];
-$bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version'];
+$bug['version'] = bugdar::$datastore['version']["$bug[version]"]['version'];
// ###################################################################
// custom field output
while ($attachment = $db->fetch_array($attachments_fetch))
{
$attaches = true;
- $show['editattach'] = ((can_perform('caneditattach', $bug['productid']) OR ($attachment['userid'] == $bugsys->userinfo['userid'] AND can_perform('canputattach', $bug['productid']))) ? true : false);
- $attachment['date'] = $datef->format($bugsys->options['dateformat'], $attachment['dateline']);
+ $show['editattach'] = ((can_perform('caneditattach', $bug['productid']) OR ($attachment['userid'] == bugdar::$userinfo['userid'] AND can_perform('canputattach', $bug['productid']))) ? true : false);
+ $attachment['date'] = $datef->format(bugdar::$options['dateformat'], $attachment['dateline']);
$attachment['user'] = construct_user_display($attachment, false);
eval('$attachments .= "' . $template->fetch('showreport_attachment') . '";');
}
// -------------------------------------------------------------------
// votes
-$vote = $db->query_first("SELECT *, FIND_IN_SET(" . $bugsys->userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
+$vote = $db->query_first("SELECT *, FIND_IN_SET(" . bugdar::$userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
$vote['total'] = $vote['votefor'] + $vote['voteagainst'];
if ($vote['total'] != 0)
);
while ($comment = $db->fetch_array($comments_fetch))
{
- $comment['posttime'] = $datef->format($bugsys->options['dateformat'], $comment['dateline']);
+ $comment['posttime'] = $datef->format(bugdar::$options['dateformat'], $comment['dateline']);
$comment['postby'] = construct_user_display($comment);
- $show['editcomment'] = ((can_perform('caneditownreply', $bug['productid']) AND $bugsys->userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['productid']) AND $bugsys->userinfo['userid'] != $comment['userid']));
+ $show['editcomment'] = ((can_perform('caneditownreply', $bug['productid']) AND bugdar::$userinfo['userid'] == $comment['userid']) OR (can_perform('caneditotherreply', $bug['productid']) AND bugdar::$userinfo['userid'] != $comment['userid']));
- $bugsys->debug('can edit own replies: ' . (int)(can_perform('caneditownreply', $bug['productid']) AND $bugsys->userinfo['userid'] == $comment['userid']));
- $bugsys->debug('can edit other replies:' . (int)(can_perform('caneditotherreply', $bug['productid']) AND $bugsys->userinfo['userid'] != $comment['userid']));
+ $bugsys->debug('can edit own replies: ' . (int)(can_perform('caneditownreply', $bug['productid']) AND bugdar::$userinfo['userid'] == $comment['userid']));
+ $bugsys->debug('can edit other replies:' . (int)(can_perform('caneditotherreply', $bug['productid']) AND bugdar::$userinfo['userid'] != $comment['userid']));
$bugsys->debug('$show[editcomment]: ' . $show['editcomment']);
if (is_array($hilight))
WHERE bug.product IN (" . fetch_on_bits('canviewbugs', fetch_guest_user()) . ")
AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden', fetch_guest_user()) . ")))
ORDER BY " . (can_perform('canviewhidden', 0, fetch_guest_user()) ? "bug.lastposttime" : "bug.hiddenlastposttime") . " DESC
- LIMIT " . $bugsys->options['syndicateditems']
+ LIMIT " . bugdar::$options['syndicateditems']
);
while ($bug = $db->fetch_array($bugs_fetch))
{
</tr>
<tr>
<td><strong>' . T('Product/Component/Version') . ':</strong></td>
- <td>' . $bugsys->datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? $bugsys->datastore['product']["$bug[component]"]['title'] . '/' : '') . $bugsys->datastore['version']["$bug[version]"]['version'] . '</td>
+ <td>' . bugdar::$datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? bugdar::$datastore['product']["$bug[component]"]['title'] . '/' : '') . bugdar::$datastore['version']["$bug[version]"]['version'] . '</td>
</tr>
<tr>
<td><strong>' . T('Status') . ':</strong></td>
- <td>' . $bugsys->datastore['status']["$bug[status]"]['status'] . '</td>
+ <td>' . bugdar::$datastore['status']["$bug[status]"]['status'] . '</td>
</tr>
<tr>
<td><strong>' . T('Severity') . ':</strong></td>
- <td>' . $bugsys->datastore['severity']["$bug[severity]"]['severity'] . '</td>
+ <td>' . bugdar::$datastore['severity']["$bug[severity]"]['severity'] . '</td>
</table>
<p>' . $bug['comment_parsed'] . '</p>') . '
</content>
<summary type="text">' . htmlspecialchars($bug['comment_parsed']) . '</summary>
- <link rel="alternate" href="' . $bugsys->options['trackerurl'] . '/showreport.php?bugid=' . $bug['bugid'] . '"/>
+ <link rel="alternate" href="' . bugdar::$options['trackerurl'] . '/showreport.php?bugid=' . $bug['bugid'] . '"/>
</entry>';
$lastupdated = $bug["$timestamp"];
echo '<?xml version="1.0" encoding="' . $language['charset'] . '"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <title>' . sprintf(T('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . '</title>
- <link href="' . $bugsys->options['trackerurl'] . '"/>
+ <title>' . sprintf(T('%1$s Syndication Feed'), bugdar::$options['trackertitle']) . '</title>
+ <link href="' . bugdar::$options['trackerurl'] . '"/>
<updated>' . gmdate('Y-m-d\TH:i:s\Z', $lastupdated) . '</updated>
<!-- entries -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="$stylevar[lang]" xml:lang="$stylevar[lang]" dir="$stylevar[lang_dir]">
<head>
$headinclude
- <title>{$bugsys->options['trackertitle']} - {@"Automations"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Automations"}</title>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$stylevar[lang]" xml:lang="$stylevar[lang]" dir="$stylevar[lang_dir]">
<head>
$headinclude
- <title>{$bugsys->options['trackertitle']} - {@"Products"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Products"}</title>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$stylevar[lang]" xml:lang="$stylevar[lang]" dir="$stylevar[lang_dir]">
<head>
$headinclude
- <title>{$bugsys->options['trackertitle']} - {@"My Favorite Bugs"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"My Favorite Bugs"}</title>
</head>
<body>
</form>
<!-- / quick search -->
- <span id="title"><a href="index.php">{$bugsys->options['trackertitle']}</a></span>
+ <span id="title"><a href="index.php">{bugdar::$options['trackertitle']}</a></span>
<img src="templates/images/clock.gif" alt="{@"Current Date and Time"}" />
<span id="time">$datetime</span>
</div>
-<if condition="!$bugsys->userinfo['userid']">
+<if condition="!bugdar::$userinfo['userid']">
<div class="alertbox">
{@"Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the <a href="register.php">Register</a> tab at the top. If you are already registered, you can login at the <a href="login.php">Login</a> tab."}
</div>
<if condition="$show['search']">
<a class="tab$focus[search]" href="search.php">{@"Search"}</a>
</if>
- <if condition="$bugsys->userinfo['userid']">
+ <if condition="bugdar::$userinfo['userid']">
<a class="tab$focus[favorites]" href="favorite.php">{@"Favorites"}</a>
</if>
- <a class="tab$focus[user]" href="<if condition="$bugsys->userinfo['userid']">userctrl.php">{@"Options"}<else />login.php">{@"Login/Register"}</if></a>
+ <a class="tab$focus[user]" href="<if condition="bugdar::$userinfo['userid']">userctrl.php">{@"Options"}<else />login.php">{@"Login/Register"}</if></a>
<if condition="$show['admin']">
<a class="tab" href="admin/index.php">{@"Administration"}</a>
</if>
- <if condition="$bugsys->userinfo['userid']">
+ <if condition="bugdar::$userinfo['userid']">
<a class="tab$focus[logout]" href="login.php?do=logout" onclick="return confirm('{@"Are you sure you want to log out?"}')">{@"Logout"}</a>
</if>
</div>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Login"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Login"}</title>
</head>
<body>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Lost Password"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Lost Password"}</title>
</head>
<body>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/report.css" media="screen" />
<link rel="stylesheet" type="text/css" href="templates/fields.css" media="screen" />
- <title>{@"New Bug Report"} - {$bugsys->options['trackertitle']}</title>
+ <title>{@"New Bug Report"} - {bugdar::$options['trackertitle']}</title>
</head>
<body>
<fieldset>
<legend>{@"Description/Initial Report"}</legend>
- <textarea name="comment" cols="50" rows="10" class="textarea"><if condition="$bugsys->in['comment']">{$bugsys->in['comment']}<else />{$bugsys->options['defaultcomment']}</if></textarea>
+ <textarea name="comment" cols="50" rows="10" class="textarea"><if condition="$bugsys->in['comment']">{$bugsys->in['comment']}<else />{bugdar::$options['defaultcomment']}</if></textarea>
<div><input type="checkbox" name="parselinks" value="1"<if condition="$bugsys->in['parselinks']"> checked="checked"</if> /> {@"Parse Links in the Comment"}</div>
</fieldset>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Reset Password"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Reset Password"}</title>
</head>
<body>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Quick Search"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Quick Search"}</title>
</head>
<body>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Register"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Register"}</title>
</head>
<body>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/report.css" media="screen" />
<link rel="stylesheet" type="text/css" href="templates/fields.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Search"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Search"}</title>
</head>
<body>
</fieldset>
<!-- / severity -->
- <if condition="$bugsys->userinfo['userid']">
+ <if condition="bugdar::$userinfo['userid']">
<!-- favorite -->
<fieldset>
<legend>{@"Favorite"}</legend>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$stylevar[lang]" xml:lang="$stylevar[lang]" dir="$stylevar[lang_dir]">
<head>
$headinclude
- <title>{$bugsys->options['trackertitle']} - {@"Search Results"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Search Results"}</title>
</head>
<body>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Save Search"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Save Search"}</title>
</head>
<body>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/report.css" media="screen" />
<link rel="stylesheet" type="text/css" href="templates/fields.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Mass Update"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Mass Update"}</title>
</head>
<body>
</fieldset>
<!-- / severity -->
- <if condition="$bugsys->userinfo['userid']">
+ <if condition="bugdar::$userinfo['userid']">
<!-- favorite -->
<fieldset>
<legend>{@"Favorite"}</legend>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"Error"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Error"}</title>
</head>
<body>
<head>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - <if condition="$show['confirm']">{@"Confirm"}<else />{@"Notice"}</if></title>
+ <title>{bugdar::$options['trackertitle']} - <if condition="$show['confirm']">{@"Confirm"}<else />{@"Notice"}</if></title>
</head>
<body>
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
<meta http-equiv="refresh" content="2; url=$url" />
- <title>{$bugsys->options['trackertitle']} - {@"Redirect..."}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Redirect..."}</title>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$stylevar[lang]" xml:lang="$stylevar[lang]" dir="$stylevar[lang_dir]">
<head>
$headinclude
- <title>{$bugsys->options['trackertitle']} - {@"Bug Listing"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"Bug Listing"}</title>
</head>
<body>
<!-- bug $bug[bugid] -->
-<tr<if condition="$bugsys->userinfo['showcolors']"> style="background-color: $bug[bgcolor]<if condition="$bug['hidden']">; font-style: italic</if>"<else /> class="$bug[bgcolor]"<if condition="$bug['hidden']"> style="font-style: italic"</if></if>>
+<tr<if condition="bugdar::$userinfo['showcolors']"> style="background-color: $bug[bgcolor]<if condition="$bug['hidden']">; font-style: italic</if>"<else /> class="$bug[bgcolor]"<if condition="$bug['hidden']"> style="font-style: italic"</if></if>>
$fields
</tr>
<!-- / bug $bug[bugid] -->
$headinclude
<link rel="stylesheet" type="text/css" href="templates/box.css" media="screen" />
<link rel="stylesheet" type="text/css" href="templates/fields.css" media="screen" />
- <title>{$bugsys->options['trackertitle']} - {@"User Options"}</title>
+ <title>{bugdar::$options['trackertitle']} - {@"User Options"}</title>
</head>
<body>
<div class="box-head" style="text-align: $stylevar[left]">{@"User Options"}</div>
<div class="box-mid">
- <if condition="$bugsys->options['authmethod'] == 'default'">
+ <if condition="bugdar::$options['authmethod'] == 'default'">
<fieldset>
<legend>{@"Display Name"}</legend>
<input type="text" name="displayname" value="{$userinfo['displayname']}" size="25" style="width: 100%" maxlength="250" />
</td>
<td>
- <if condition="$bugsys->options['authmethod'] == 'default'">
+ <if condition="bugdar::$options['authmethod'] == 'default'">
<!-- password and email -->
<div class="box">
<div class="box-head" style="text-align: $stylevar[left]">
APIError(array(new API_Error_Handler($message), 'user_cumulative'));
-if (!$bugsys->userinfo['userid'])
+if (!bugdar::$userinfo['userid'])
{
$message->errorPermission();
}
$userapi = new UserAPI($bugsys);
-$userapi->set('userid', $bugsys->userinfo['userid']);
+$userapi->set('userid', bugdar::$userinfo['userid']);
$userapi->set_condition();
-$userinfo = $bugsys->userinfo;
+$userinfo = bugdar::$userinfo;
// ###################################################################
if ($_POST['do'] == 'killsearch')
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
if (!$search)
{
$message->errorPermission();
if ($_REQUEST['do'] == 'deletesearch')
{
- $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . $bugsys->userinfo['userid']);
+ $search = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "search WHERE searchid = " . $bugsys->input_clean('searchid', TYPE_UINT) . " AND userid = " . bugdar::$userinfo['userid']);
if (!$search)
{
$message->errorPermission();
}
else
{
- if (md5(md5($bugsys->in['validate']) . md5($bugsys->userinfo['salt'])) != $bugsys->userinfo['password'])
+ if (md5(md5($bugsys->in['validate']) . md5(bugdar::$userinfo['salt'])) != bugdar::$userinfo['password'])
{
$message->addError(T('Your authentication password does not match the one in our records'));
}
{
$userapi->update();
- $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $bugsys->userinfo['userid']);
+ $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . bugdar::$userinfo['userid']);
$bugsys->input_clean('emailopts', TYPE_INT);
if (is_array($bugsys->in['emailopts']))
{
$bitmask += $option * $yes;
}
}
- $db->query("INSERT INTO " . TABLE_PREFIX . "useremail (userid, relation, mask) VALUES (" . $bugsys->userinfo['userid'] . ", $relation, $bitmask)");
+ $db->query("INSERT INTO " . TABLE_PREFIX . "useremail (userid, relation, mask) VALUES (" . bugdar::$userinfo['userid'] . ", $relation, $bitmask)");
}
}
$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($bugsys->datastore['status']) < 8 ? sizeof($bugsys->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']);
$checked = array();
if (!is_array($bugsys->in['emailopts']))
{
- $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $bugsys->userinfo['userid']);
+ $options = $db->query("SELECT * FROM " . TABLE_PREFIX . "useremail WHERE userid = " . bugdar::$userinfo['userid']);
while ($opt = $db->fetch_array($options))
{
foreach ($bugsys->emailoptions['notifications'] AS $name => $notif)
{
foreach (ListSorter::fetch_by_text(false) AS $column => $name)
{
- if (is_array($bugsys->userinfo['columnoptions']))
+ if (is_array(bugdar::$userinfo['columnoptions']))
{
- $columns["$column"] = $bugsys->userinfo['columnoptions']["$column"];
+ $columns["$column"] = bugdar::$userinfo['columnoptions']["$column"];
}
else
{
- $columns["$column"] = $bugsys->options['columnoptions']["$column"];
+ $columns["$column"] = bugdar::$options['columnoptions']["$column"];
}
eval('$columnOptions .= "' . $template->fetch('userctrl_column') . '";');
}
// searches
$searches = '';
- $searchesFetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NOT NULL AND userid = " . $bugsys->userinfo['userid']);
+ $searchesFetch = $db->query("SELECT * FROM " . TABLE_PREFIX . "search WHERE name IS NOT NULL AND userid = " . bugdar::$userinfo['userid']);
while ($search = $db->fetch_array($searchesFetch))
{
eval('$searches .= "' . $template->fetch('userctrl_search') . '";');
if ($_REQUEST['do'] == 'vote')
{
$bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . $bugsys->input_clean('bugid', TYPE_UINT));
- $vote = $db->query_first("SELECT *, FIND_IN_SET(" . $bugsys->userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
+ $vote = $db->query_first("SELECT *, FIND_IN_SET(" . bugdar::$userinfo['userid'] . ", userids) AS uservote FROM " . TABLE_PREFIX . "vote WHERE bugid = $bug[bugid]");
if (!check_bug_permissions($bug))
{
// handle userids
$userids = $vote['userids'];
- if ($bugsys->userinfo['userid'])
+ if (bugdar::$userinfo['userid'])
{
if (trim($vote['userids']))
{
- $userids .= ',' . $bugsys->userinfo['userid'];
+ $userids .= ',' . bugdar::$userinfo['userid'];
}
else
{
- $userids = $bugsys->userinfo['userid'];
+ $userids = bugdar::$userinfo['userid'];
}
}