Removing uses of $bugsys
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 17 Sep 2008 14:12:25 +0000 (10:12 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 17 Sep 2008 14:39:14 +0000 (10:39 -0400)
global.php
includes/class_mo.php
includes/class_sort.php
includes/functions.php
includes/functions_product.php
includes/init.php
includes/language.php
newreport.php
search.php

index 86677eb76557154dabdc682ecb4277d0570afce8..6b0afeaf719a896bd641e17c673a6fa5ae3ad34c 100755 (executable)
@@ -96,7 +96,6 @@ if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
 // create error reporter
 require_once('./includes/class_message_reporter.php');
 $message = new MessageReporter();
-$bugsys->message = $message;
 
 /*=====================================================================*\
 || ###################################################################
index 17c24be85c6b8d36f7576b2dcb9c03be119bcd70..ca81a5a23b3bb0d14e63aacd1e71eb5d50991523 100644 (file)
@@ -108,8 +108,6 @@ class MOReader
         */
        function _loadFile()
        {
-               global $bugsys;
-               
                $this->file = @fopen($this->filename, 'r');
                if (!$this->file)
                {
index e260c8dcc1c75b52057b142d22d415400197d9ff..94ad6c976c899a7d6631522f28bccf8ad2b5a1aa 100644 (file)
@@ -376,8 +376,6 @@ class ListSorter
         */
        function constructRow($bug, $params = null)
        {
-               global $bugsys;
-               
                $this->_processColumns();
                                
                foreach ($this->columns as $columns)
index 1d9f87069455f3563d231e76c69a784b71ad45e3..f9f50637438e07dd1295b2652372b9673eb0a264 100755 (executable)
@@ -38,8 +38,6 @@
 */
 function construct_option_select($name, $array, $selected = 0, $valuekey = '', $labelkey = '', $includenil = false, $multiple = false)
 {
-       global $bugsys;
-       
        if ($multiple)
        {
                $selected = explode(',', $selected);
@@ -99,8 +97,6 @@ function construct_user_display($userinfo, $html = true)
 // short-hand for bitwise &
 function can_perform($bitmask, $productid = 0, $userinfo = null)
 {
-       global $bugsys;
-       
        // masks that aren't product-specific
        static $inspecific = array(
                'cansearch',
@@ -167,8 +163,6 @@ function can_perform($bitmask, $productid = 0, $userinfo = null)
  */
 function construct_datastore_select($datastore, $labelname, $valuename, $selectedvalue = 0, $includeblank = false, $adminmode = false)
 {
-       global $bugsys;
-       
        if ($adminmode)
        {
                global $admin;
@@ -483,8 +477,6 @@ function process_custom_fields(&$bugapi, &$msg, $errorbox = false, $searchMode =
 // ####################### Start fetch_on_bits #######################
 function fetch_on_bits($mask, $userinfo = null)
 {
-       global $bugsys;
-       
        if ($userinfo == null)
        {
                $userinfo =& bugdar::$userinfo;
@@ -603,8 +595,6 @@ function fetch_help_link($topic)
 */
 function fetch_guest_user()
 {
-       global $bugsys;
-               
        return array(
                'usergroupid' => 1,
                'groupids' => array(),
@@ -633,7 +623,6 @@ function fetch_guest_user()
 */
 function check_bug_permissions($bug, $userinfo = null)
 {
-       global $bugsys;
        if ($userinfo == null)
        {
                $userinfo = bugdar::$userinfo;
@@ -692,9 +681,7 @@ function check_bug_permissions($bug, $userinfo = null)
 * @param       array   Bug array with data fit for display
 */
 function ProcessBugDataForDisplay($bug, $color = '')
-{
-       global $bugsys;
-       
+{      
        $bug['hiddendisplay'] = ($bug['hidden'] AND (can_perform('canviewhidden', $bug['product']) OR (can_perform('canviewownhidden') AND $bug['userid'] == bugdar::$userinfo['userid'])));
        
        $bug['bgcolor'] = (bugdar::$userinfo['showcolors'] ? bugdar::$datastore['status']["$bug[status]"]['color'] : $color);
@@ -729,8 +716,6 @@ function ProcessBugDataForDisplay($bug, $color = '')
 */
 function FetchUserPermissions(&$user)
 {
-       global $bugsys;
-       
        $perms = (int)bugdar::$datastore['usergroup']["$user[usergroupid]"]['permissions'];
        if (!is_array($user['groupids']))
        {
index f4feb30ece5df84d2bd8c19e82ed8526e83f8842..643c16b04a615f826490b7b9138f3584b3d5a49b 100644 (file)
@@ -84,8 +84,6 @@ function construct_product_select($action = 'canviewbugs', $select = null, $obso
  */
 function construct_version_select($productid, $select, $obsolete)
 {
-       global $bugsys;
-       
        $product = bugdar::$datastore['product']["$productid"];
        $component = null;
        
index f65826ee392237e6ff2a88a5614ee8e30c4b0dc4..5783eae42bf813aeec046f2a251ee189b6b5c9df 100755 (executable)
@@ -128,7 +128,7 @@ $authMethod = ((defined('USE_DEFAULT_AUTH_METHOD') AND constant('USE_DEFAULT_AUT
 require_once('./includes/auth/auth_' . $authMethod . '.php');
 
 $authClass = 'Authentication' . str_replace(' ', '', ucwords(str_replace('_', ' ', $authMethod)));
-$bugsys->auth = $auth = new $authClass();
+$auth = new $authClass();
 
 if ($auth->authenticateCookies())
 {
index 35e296cb9191c72bb11c943e893fb2d6adadf8fb..0be105610664377d1fd876d32707db56f4afdbb1 100644 (file)
@@ -42,8 +42,6 @@ define('L_INVALID_ID', T('That is an invalid ID.'));
 // determines the user's language
 function fetch_user_language()
 {
-       global $bugsys;
-       
        if (bugdar::$userinfo['userid'])
        {
                $languageid = bugdar::$userinfo['languageid'];
@@ -83,7 +81,6 @@ function fetch_user_language()
  */
 function T($str)
 {
-       global $bugsys;
        static $mo;
        
        if (!bugdar::$options['devgettext'])
index f343c4242c9d0210092658fdd9479aa6954ca1c6..db3008a0aac4924b97fb34ec7b3b9c9ef8723cdd 100755 (executable)
@@ -172,7 +172,7 @@ if ($_REQUEST['do'] == 'add')
        }
        
        // custom fields
-       $fields = construct_custom_fields($bugsys->in, true);           
+       $fields = construct_custom_fields($input->in, true);            
        $i = 0;
        foreach ($fields AS $field)
        {
index 6014a6eda4c4a15e0aed4e2418b73341c1ae4a5b..4a54301386cc6e9e43235a1346ca4afc5d6317c6 100644 (file)
@@ -231,7 +231,7 @@ if ($_REQUEST['do'] == 'process')
        {
                // force email or name?? make a distinction?
                // more elegant way to do this? probably
-               $user = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE email LIKE '%" . str_replace('%', '\%', $bugsys->input_escape('reporter')) . "' OR displayname LIKE '%" . str_replace('%', '\%', $bugsys->input_escape('reporter')) . "%'");
+               $user = $db->queryFirst("SELECT * FROM " . TABLE_PREFIX . "user WHERE email LIKE '%" . str_replace('%', '\%', $input->inputEscape('reporter')) . "' OR displayname LIKE '%" . str_replace('%', '\%', $input->inputEscape('reporter')) . "%'");
                if ($user['userid'])
                {
                        $querybuild['reporter'] = "AND bug.userid = $user[userid] OR comment.userid = $user[userid]";
@@ -537,7 +537,7 @@ if ($_POST['do'] == 'doupdate')
                        continue;
                }
                                
-               $api = new BugApi($bugsys);
+               $api = new BugApi();
                $api->set('bugid', $bug['bugid']);
                $api->values = $bug;