From c764f078f10061c016228fb079dc7302af52f60c Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Wed, 26 Sep 2007 23:57:51 -0400 Subject: Made some things in config.inc.proto that should be constants constants Signed-off-by: Loui Chang --- web/lib/aur.inc | 24 ++---------------------- web/lib/config.inc.proto | 42 +++++++++++++++++++++++++++++++++++------- web/lib/pkgfuncs.inc | 3 +-- 3 files changed, 38 insertions(+), 31 deletions(-) (limited to 'web/lib') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index cce53848..7342e857 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -12,26 +12,6 @@ include_once("aur_po.inc"); # is using... # -# Define global variables -# -$LOGIN_TIMEOUT = 7200; # number of idle seconds before timeout -$SUPPORTED_LANGS = array( # what languages we have translations for - "en" => "English", - "pl" => "Polski", - "it" => "Italiano", - "ca" => "Català", - "pt" => "Português", - # Eventually we will comment these in, when they are ready - PJM - 4/2005 - "es" => "Español", - "de" => "Deutsch", - "ru" => "Русский", - "fr" => "Français", -); - -# debugging variables -# -$QBUG = 1; # toggle query logging to /var/tmp/aurq.log -$DBUG = 1; # use dbug($msg) to log to /var/tmp/aurd.log # return an array of info for each Trusted user @@ -296,7 +276,7 @@ function db_query($query="", $db_handle="") { $db_handle = db_connect(); } if ($QBUG) { - $fp = fopen("/var/tmp/aurq.log", "a"); + $fp = fopen(AURQ_LOG, "a"); fwrite($fp, $query . "\n"); fclose($fp); } @@ -479,7 +459,7 @@ function html_footer($ver="") { # debug logging # function dbug($msg) { - $fp = fopen("/var/tmp/aurd.log", "a"); + $fp = fopen(AURD_LOG, "a"); fwrite($fp, $msg . "\n"); fclose($fp); return; diff --git a/web/lib/config.inc.proto b/web/lib/config.inc.proto index fcb8b3a2..bad94a0c 100644 --- a/web/lib/config.inc.proto +++ b/web/lib/config.inc.proto @@ -1,15 +1,43 @@ "English", + "pl" => "Polski", + "it" => "Italiano", + "ca" => "Català", + "pt" => "Português", + "es" => "Español", + "de" => "Deutsch", + "ru" => "Русский", + "fr" => "Français" +); # vim: ts=2 sw=2 noet ft=php ?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index b9ad0d4a..d6213d8d 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -365,8 +365,7 @@ function package_details($id=0, $SID="") { print "\n"; print " "; if ($row["LocationID"] == 2) { - global $URL_DIR; - $urlpath = $URL_DIR.$row["Name"]."/".$row["Name"]; + $urlpath = URL_DIR.$row["Name"]."/".$row["Name"]; print "".__("Tarball")." :: ".__("Files")." :: PKGBUILD"; } elseif ($row["LocationID"] == 3) { print "CVS"; -- cgit v1.2.3-24-g4f1b