From 7b9956f225cd885c861db0cb145b16b3b8441ca7 Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 11 Jul 2004 17:04:32 +0000 Subject: cleaned up physical scripts --- web/lib/aur.inc | 16 ++++++---------- web/lib/pkgfuncs.inc | 8 ++++---- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'web/lib') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 005c564..7ea1e96 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -62,7 +62,7 @@ function check_sid() { global $_COOKIE; global $LOGIN_TIMEOUT; - if (isset($_COOKIE["AURSID"])) { + if ($_COOKIE["AURSID"]) { $failed = 0; # the visitor is logged in, try and update the session # @@ -290,18 +290,18 @@ function set_lang() { global $SUPPORTED_LANGS; $update_cookie = 0; - if (isset($_REQUEST['setlang'])) { + if ($_REQUEST['setlang']) { # visitor is requesting a language change # $LANG = $_REQUEST['setlang']; $update_cookie = 1; - } elseif (isset($_COOKIE['AURLANG'])) { + } elseif ($_COOKIE['AURLANG']) { # If a cookie is set, use that # $LANG = $_COOKIE['AURLANG']; - } elseif (isset($_COOKIE["AURSID"])) { + } elseif ($_COOKIE["AURSID"]) { $dbh = db_connect(); $q = "SELECT LangPreference FROM Users, Sessions "; $q.= "WHERE Users.ID = Sessions.UsersID "; @@ -392,17 +392,13 @@ function html_header() { print " - "; print " ".__("Accounts")." "; print " - "; - print " ".__("Packages")." "; - if (isset($_COOKIE["AURSID"])) { + print " ".__("Packages")." "; + if ($_COOKIE["AURSID"]) { # Only display these items if the visitor is logged in. This should # be a safe check because check_sid() has been called prior to # html_header(). # print " - "; - print " ".__("Vote")." "; - print " - "; - print " ".__("Manage")." "; - print " - "; print " ".__("Submit")." "; print " - "; print " ".__("Logout")." "; diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 0b7a000..658dfba 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -12,7 +12,7 @@ function pkgsearch_results_link() { global $_REQUEST; global $pkgsearch_vars; - $url_data = ""; $deps = package_dependencies($row["ID"]); # $deps[0] = array('id','name'); while (list($k, $darr) = each($deps)) { - $url = "\n"; + print "
\n"; print "\n"; print "
\n"; @@ -588,7 +588,7 @@ function pkg_search_page($SID="") { print " "; print $cats[$row["CategoryID"]]."\n"; print " "; - $url = "