From 7bad8a8357773e7918e0b794dbec8a36ee9154ad Mon Sep 17 00:00:00 2001 From: Simo Leone Date: Wed, 23 Jan 2008 02:51:33 -0600 Subject: Removed QBUG and DBUG It was broken and hardly used. It's just as easy to add short print statements or logging if some debugging output is needed. Signed-off-by: Simo Leone --- web/html/packages.php | 9 --------- web/html/pkgedit.php | 7 ------- web/html/pkgsubmit.php | 10 ---------- web/lib/aur.inc | 16 ---------------- web/lib/config.inc.proto | 8 -------- 5 files changed, 50 deletions(-) diff --git a/web/html/packages.php b/web/html/packages.php index 85012e0b..053756fe 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -26,15 +26,6 @@ if (isset($_GET['ID'])) { html_header($title); # print out the HTML header -# enable debugging -# -$DBUG = 0; -if ($DBUG) { - print "
\n";
-	print_r($_REQUEST);
-	print "
\n"; -} - # get login privileges # if (isset($_COOKIE["AURSID"])) { diff --git a/web/html/pkgedit.php b/web/html/pkgedit.php index 9eb2fe24..24b6e23a 100644 --- a/web/html/pkgedit.php +++ b/web/html/pkgedit.php @@ -10,13 +10,6 @@ check_sid(); # see if they're still logged in html_header(); # print out the HTML header $svn_idstr = "\$Id$"; -$DBUG = 0; -if ($DBUG) { - print "
\n";
-	print_r($_REQUEST);
-	print "
\n"; -} - # Make sure this visitor is logged in # if (isset($_COOKIE["AURSID"])) { diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 2c0c7d08..1b74ce77 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -13,20 +13,10 @@ echo "
\n"; echo "
".__("Submit")."
\n"; echo "
\n"; -# Debugging -$DBUG = 0; - if ($_COOKIE["AURSID"]) { # track upload errors # $error = ""; - if ($DBUG) { - print "
\n";
-		print_r($_REQUEST);
-        print "
"; - print_r($_FILES); - print "
\n"; - } if ($_REQUEST["pkgsubmit"]) { #Before processing, make sure we even have a file diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 5dec6e3c..234dca98 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -86,7 +86,6 @@ function check_sid() { } else { $row = mysql_fetch_row($result); if ($row[0] + $LOGIN_TIMEOUT <= $row[1]) { - dbug("login timeout reached"); $failed = 2; } } @@ -267,18 +266,12 @@ function db_connect() { # query logging/debuggin in. # function db_query($query="", $db_handle="") { - global $QBUG; if (!$query) { return FALSE; } if (!$db_handle) { $db_handle = db_connect(); } - if ($QBUG) { - $fp = fopen(AURQ_LOG, "a"); - fwrite($fp, $query . "\n"); - fclose($fp); - } $result = @mysql_query($query, $db_handle); return $result; } @@ -419,15 +412,6 @@ function html_footer($ver="") { return; } -# debug logging -# -function dbug($msg) { - $fp = fopen(AURD_LOG, "a"); - fwrite($fp, $msg . "\n"); - fclose($fp); - return; -} - # check to see if the user can submit a package # function can_submit_pkg($name="", $sid="") { diff --git a/web/lib/config.inc.proto b/web/lib/config.inc.proto index 11c0cb41..b0f7615f 100644 --- a/web/lib/config.inc.proto +++ b/web/lib/config.inc.proto @@ -11,9 +11,6 @@ define( "UPLOAD_DIR", "/home/aur/unsupported-temp/" ); define( "INCOMING_DIR", "/home/aur/unsupported/" ); define( "URL_DIR", "/packages/" ); -define( "AURQ_LOG", "/home/aur/aurq.log" ); -define( "AURD_LOG", "/home/aur/aurd.log" ); - define( "USERNAME_MIN_LEN", 3 ); define( "USERNAME_MAX_LEN", 16 ); define( "PASSWD_MIN_LEN", 4 ); @@ -21,11 +18,6 @@ define( "PASSWD_MAX_LEN", 128 ); $LOGIN_TIMEOUT = 7200; # number of idle seconds before timeout -# debugging variables -# -$QBUG = 1; # toggle query logging to /var/tmp/aurq.log -$DBUG = 1; # use dbug($msg) to log to /var/tmp/aurd.log - $SUPPORTED_LANGS = array( # what languages we have translations for "en" => "English", "pl" => "Polski", -- cgit v1.2.3-24-g4f1b