mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <simo@archlinux.org>
This commit is contained in:
parent
2bcd8ff1db
commit
7bad8a8357
5 changed files with 0 additions and 50 deletions
|
@ -26,15 +26,6 @@ if (isset($_GET['ID'])) {
|
||||||
|
|
||||||
html_header($title); # print out the HTML header
|
html_header($title); # print out the HTML header
|
||||||
|
|
||||||
# enable debugging
|
|
||||||
#
|
|
||||||
$DBUG = 0;
|
|
||||||
if ($DBUG) {
|
|
||||||
print "<pre>\n";
|
|
||||||
print_r($_REQUEST);
|
|
||||||
print "</pre>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# get login privileges
|
# get login privileges
|
||||||
#
|
#
|
||||||
if (isset($_COOKIE["AURSID"])) {
|
if (isset($_COOKIE["AURSID"])) {
|
||||||
|
|
|
@ -10,13 +10,6 @@ check_sid(); # see if they're still logged in
|
||||||
html_header(); # print out the HTML header
|
html_header(); # print out the HTML header
|
||||||
$svn_idstr = "\$Id$";
|
$svn_idstr = "\$Id$";
|
||||||
|
|
||||||
$DBUG = 0;
|
|
||||||
if ($DBUG) {
|
|
||||||
print "<pre>\n";
|
|
||||||
print_r($_REQUEST);
|
|
||||||
print "</pre>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure this visitor is logged in
|
# Make sure this visitor is logged in
|
||||||
#
|
#
|
||||||
if (isset($_COOKIE["AURSID"])) {
|
if (isset($_COOKIE["AURSID"])) {
|
||||||
|
|
|
@ -13,20 +13,10 @@ echo "<div class=\"pgbox\">\n";
|
||||||
echo " <div class=\"pgboxtitle\"><span class=\"f3\">".__("Submit")."</span></div>\n";
|
echo " <div class=\"pgboxtitle\"><span class=\"f3\">".__("Submit")."</span></div>\n";
|
||||||
echo " <div class=\"pgboxbody\">\n";
|
echo " <div class=\"pgboxbody\">\n";
|
||||||
|
|
||||||
# Debugging
|
|
||||||
$DBUG = 0;
|
|
||||||
|
|
||||||
if ($_COOKIE["AURSID"]) {
|
if ($_COOKIE["AURSID"]) {
|
||||||
# track upload errors
|
# track upload errors
|
||||||
#
|
#
|
||||||
$error = "";
|
$error = "";
|
||||||
if ($DBUG) {
|
|
||||||
print "</center><pre>\n";
|
|
||||||
print_r($_REQUEST);
|
|
||||||
print "<br>";
|
|
||||||
print_r($_FILES);
|
|
||||||
print "</pre><center>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_REQUEST["pkgsubmit"]) {
|
if ($_REQUEST["pkgsubmit"]) {
|
||||||
#Before processing, make sure we even have a file
|
#Before processing, make sure we even have a file
|
||||||
|
|
|
@ -86,7 +86,6 @@ function check_sid() {
|
||||||
} else {
|
} else {
|
||||||
$row = mysql_fetch_row($result);
|
$row = mysql_fetch_row($result);
|
||||||
if ($row[0] + $LOGIN_TIMEOUT <= $row[1]) {
|
if ($row[0] + $LOGIN_TIMEOUT <= $row[1]) {
|
||||||
dbug("login timeout reached");
|
|
||||||
$failed = 2;
|
$failed = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,18 +266,12 @@ function db_connect() {
|
||||||
# query logging/debuggin in.
|
# query logging/debuggin in.
|
||||||
#
|
#
|
||||||
function db_query($query="", $db_handle="") {
|
function db_query($query="", $db_handle="") {
|
||||||
global $QBUG;
|
|
||||||
if (!$query) {
|
if (!$query) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!$db_handle) {
|
if (!$db_handle) {
|
||||||
$db_handle = db_connect();
|
$db_handle = db_connect();
|
||||||
}
|
}
|
||||||
if ($QBUG) {
|
|
||||||
$fp = fopen(AURQ_LOG, "a");
|
|
||||||
fwrite($fp, $query . "\n");
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
$result = @mysql_query($query, $db_handle);
|
$result = @mysql_query($query, $db_handle);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
@ -419,15 +412,6 @@ function html_footer($ver="") {
|
||||||
return;
|
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
|
# check to see if the user can submit a package
|
||||||
#
|
#
|
||||||
function can_submit_pkg($name="", $sid="") {
|
function can_submit_pkg($name="", $sid="") {
|
||||||
|
|
|
@ -11,9 +11,6 @@ define( "UPLOAD_DIR", "/home/aur/unsupported-temp/" );
|
||||||
define( "INCOMING_DIR", "/home/aur/unsupported/" );
|
define( "INCOMING_DIR", "/home/aur/unsupported/" );
|
||||||
define( "URL_DIR", "/packages/" );
|
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_MIN_LEN", 3 );
|
||||||
define( "USERNAME_MAX_LEN", 16 );
|
define( "USERNAME_MAX_LEN", 16 );
|
||||||
define( "PASSWD_MIN_LEN", 4 );
|
define( "PASSWD_MIN_LEN", 4 );
|
||||||
|
@ -21,11 +18,6 @@ define( "PASSWD_MAX_LEN", 128 );
|
||||||
|
|
||||||
$LOGIN_TIMEOUT = 7200; # number of idle seconds before timeout
|
$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
|
$SUPPORTED_LANGS = array( # what languages we have translations for
|
||||||
"en" => "English",
|
"en" => "English",
|
||||||
"pl" => "Polski",
|
"pl" => "Polski",
|
||||||
|
|
Loading…
Add table
Reference in a new issue