From 94967c7cbbd02f831a27b3f460a165b3029a13db Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 26 Jun 2008 11:05:21 -0400 Subject: [PATCH] Change $bugsys->debug to BSApp::debug --- attachment.php | 2 +- includes/functions.php | 32 ++++++++++++++++---------------- includes/language.php | 4 ++-- search.php | 2 +- showreport.php | 6 +++--- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/attachment.php b/attachment.php index 77126c1..f2f38fb 100755 --- a/attachment.php +++ b/attachment.php @@ -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']; diff --git a/includes/functions.php b/includes/functions.php index e2f643b..97d1435 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -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; } diff --git a/includes/language.php b/includes/language.php index c99350f..35e296c 100644 --- a/includes/language.php +++ b/includes/language.php @@ -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"); diff --git a/search.php b/search.php index a7f5c41..a94baaf 100644 --- a/search.php +++ b/search.php @@ -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 { diff --git a/showreport.php b/showreport.php index f12e90b..5f3a410 100644 --- a/showreport.php +++ b/showreport.php @@ -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)) { -- 2.22.5