Change $bugsys->debug to BSApp::debug
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 15:05:21 +0000 (11:05 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 15:05:21 +0000 (11:05 -0400)
attachment.php
includes/functions.php
includes/language.php
search.php
showreport.php

index 77126c1a4415d3eba349c1e88db5511e2d04e756..f2f38fb42eb663b1c008c516a193ae67f703732b 100755 (executable)
@@ -75,7 +75,7 @@ if ($_POST['do'] == 'insert')
        
        // max packet size
        $var = $db->queryFirst("SHOW VARIABLES LIKE 'max_allowed_packet'");
-       $bugsys->debug("max_allowed_packet = $var[Value]");
+       BSApp::debug("max_allowed_packet = $var[Value]");
        
        // create alias
        $FILE =& $_FILES['attachment'];
index e2f643b50c6de4094a79579dcf66da638bd42617..97d1435f43f792b8f77f5f8c55e23c3f9cfcc53b 100755 (executable)
@@ -139,7 +139,7 @@ function can_perform($bitmask, $productid = 0, $userinfo = null)
                                $verdict |= ($permissions["$group"]["$productid"] & $bugsys->permissions["$bitmask"]);
                        }
                }
-               $bugsys->debug("verdict* on can_perform($bitmask, $productid, $userinfo[userid]) = $verdict");
+               BSApp::debug("verdict* on can_perform($bitmask, $productid, $userinfo[userid]) = $verdict");
                return $verdict;
        }
        
@@ -247,7 +247,7 @@ function construct_custom_fields($bug = array(), $ignore21mask = false, $nodefau
                
                if (!is_null($bug["custom$field[fieldid]"]))
                {
-                       $bugsys->debug("not null: $field[fieldid]");
+                       BSApp::debug("not null: $field[fieldid]");
                        $value = $bug["custom$field[fieldid]"];
                }
                else
@@ -311,10 +311,10 @@ function construct_custom_fields($bug = array(), $ignore21mask = false, $nodefau
                }
                else
                {
-                       $bugsys->debug('mask 1 processing');
+                       BSApp::debug('mask 1 processing');
                        if (is_null($bug["custom$field[fieldid]"]))
                        {
-                               $bugsys->debug("is null: $field[fieldid]");
+                               BSApp::debug("is null: $field[fieldid]");
                                if ($field['type'] == 'select_single')
                                {
                                        if ($field['usedefault'])
@@ -555,7 +555,7 @@ function fetch_help_link($topic)
        }
        else
        {
-               if ($bugsys->debug)
+               if (BSApp::debug)
                {
                        return "[[INVALID TOPIC: $topic]]";
                }
@@ -615,18 +615,18 @@ function check_bug_permissions($bug, $userinfo = null)
                $userinfo = bugdar::$userinfo;
        }
        
-       $bugsys->debug("checking permissions for $userinfo[userid] on bug $bug[bugid]");
+       BSApp::debug("checking permissions for $userinfo[userid] on bug $bug[bugid]");
        
-       $bugsys->debug('*** START VERBOSE CHECK ***');
+       BSApp::debug('*** START VERBOSE CHECK ***');
        
-       $bugsys->debug('* !can_perform(canviewbugs, $bug[product], $userinfo) = ' . (int)(!can_perform('canviewbugs', $bug['product'], $userinfo)));
-       $bugsys->debug('* $bug[hidden] = ' . (int)$bug['hidden']);
-       $bugsys->debug('* $userinfo[userid] (' . $userinfo['userid'] . ') == $bug[userid] (' . $bug['userid'] . ') = ' . (int)($userinfo['userid'] == $bug['userid']));
-       $bugsys->debug('* can_perform(canviewownhidden, $bug[product], $userinfo) = ' . (int)(!!can_perform('canviewownhidden', $bug['product'], $userinfo)));
-       $bugsys->debug('* can_perform(canviewhidden, $bug[product], $userinfo) = ' . (int)(!!can_perform('canviewhidden', $bug['product'], $userinfo)));
-       $bugsys->debug('* !$bug[hidden] = ' . (int)(!$bug['hidden']));
+       BSApp::debug('* !can_perform(canviewbugs, $bug[product], $userinfo) = ' . (int)(!can_perform('canviewbugs', $bug['product'], $userinfo)));
+       BSApp::debug('* $bug[hidden] = ' . (int)$bug['hidden']);
+       BSApp::debug('* $userinfo[userid] (' . $userinfo['userid'] . ') == $bug[userid] (' . $bug['userid'] . ') = ' . (int)($userinfo['userid'] == $bug['userid']));
+       BSApp::debug('* can_perform(canviewownhidden, $bug[product], $userinfo) = ' . (int)(!!can_perform('canviewownhidden', $bug['product'], $userinfo)));
+       BSApp::debug('* can_perform(canviewhidden, $bug[product], $userinfo) = ' . (int)(!!can_perform('canviewhidden', $bug['product'], $userinfo)));
+       BSApp::debug('* !$bug[hidden] = ' . (int)(!$bug['hidden']));
        
-       $bugsys->debug('*** END PERMISSIONS CHECK ***');
+       BSApp::debug('*** END PERMISSIONS CHECK ***');
        
        if
        (
@@ -647,11 +647,11 @@ function check_bug_permissions($bug, $userinfo = null)
                )
        )
        {
-               $bugsys->debug('*** DONE WITH REAL CALLS ***');
+               BSApp::debug('*** DONE WITH REAL CALLS ***');
                return false;
        }
        
-       $bugsys->debug('*** DONE WITH REAL CALLS ***');
+       BSApp::debug('*** DONE WITH REAL CALLS ***');
        
        return true;
 }
index c99350f4afe3966436377d7d9f2a9277c3fcc3ce..35e296cb9191c72bb11c943e893fb2d6adadf8fb 100644 (file)
@@ -30,7 +30,7 @@ if (!function_exists('gettext'))
        function textdomain() {}
        function bind_textdomain_codeset() {}
        
-       $bugsys->debug('NOTICE: gettext not installed');
+       BSApp::debug('NOTICE: gettext not installed');
 }
 
 // ###################################################################
@@ -97,7 +97,7 @@ function T($str)
                $info = fetch_user_language();
                if ($info['langcode'] == null)
                {
-                       $bugsys->debug("cannot translate '$str'");
+                       BSApp::debug("cannot translate '$str'");
                        return $str;
                }
                $mo = new MOReader("locale/$info[langcode]/LC_MESSAGES/messages.mo");
index a7f5c41e29b96d072febe7d9ed9b24299c96b91c..a94baaf7023dc8c3ff957c08004f03ad7c565b53 100644 (file)
@@ -94,7 +94,7 @@ if ($_REQUEST['do'] == 'search')
                {
                        $_REQUEST['do'] = 'process';
                        $bugsys->in = array_merge(unserialize($cachedsearch['query']), $bugsys->in);
-                       $bugsys->debug('rerunning the search');
+                       BSApp::debug('rerunning the search');
                }
                else
                {
index f12e90b6e475b6a9441ac9248fcb0017632639ab..5f3a410b7292128a419d6d428f6df9f253b9c3b2 100644 (file)
@@ -310,9 +310,9 @@ foreach ($comments_fetch as $comment)
        $comment['postby'] = construct_user_display($comment);
        $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 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']);
+       BSApp::debug('can edit own replies: ' . (int)(can_perform('caneditownreply', $bug['productid']) AND bugdar::$userinfo['userid'] == $comment['userid']));
+       BSApp::debug('can edit other replies:' . (int)(can_perform('caneditotherreply', $bug['productid']) AND bugdar::$userinfo['userid'] != $comment['userid']));
+       BSApp::debug('$show[editcomment]: ' . $show['editcomment']);
        
        if (is_array($hilight))
        {