summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-01 18:56:41 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-03-04 10:29:17 +0100
commitddbe6d0d335ba7bc7170ad234667ca62f638bd3b (patch)
tree942313e13084891456bbee93dc42e27bfc4e476d
parentef8fab0c12f567acac80c050f44db38111f00104 (diff)
downloadaur-ddbe6d0d335ba7bc7170ad234667ca62f638bd3b.tar.gz
aur-ddbe6d0d335ba7bc7170ad234667ca62f638bd3b.tar.xz
Remove dead dependency/required by link code
For some reason we were doing this song and dance "iterate all the known parameters" business. This is totally unnecessary, clutters the links, and was spewing errors all over the place, so kill it. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/lib/pkgfuncs.inc5
-rw-r--r--web/template/pkg_details.php31
2 files changed, 7 insertions, 29 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 0fbe3100..75f076ed 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -1,10 +1,6 @@
<?php
include_once("config.inc");
-# define variables used during pkgsearch
-#
-$pkgsearch_vars = array("O", "L", "C", "K", "SB", "SO", "PP", "do_Orphans", "SeB");
-
# Make sure this visitor can delete the requested package comment
# They can delete if they were the comment submitter, or if they are a TU/Dev
#
@@ -316,7 +312,6 @@ function pkgname_is_blacklisted($name) {
# display package details
#
function package_details($id=0, $SID="") {
- global $pkgsearch_vars;
$atype = account_from_sid($SID);
$uid = uid_from_sid($SID);
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 49586b9b..6a624e9c 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -111,18 +111,12 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
echo "<span class='boxSoftTitle'><span class='f3'>". __("Dependencies")."</span></span>";
while (list($k, $darr) = each($deps)) {
- $url = " <a href='packages.php?ID=".$darr[0];
- while(list($k, $var) = each($pkgsearch_vars)) {
- if (($var == "do_Orphans") && $_REQUEST[$var]) {
- $url .= "&".$var."=1";
- } else {
- $url .= "&".$var."=".rawurlencode(stripslashes($_REQUEST[$var]));
- }
+ if ($darr[2] == 0) {
+ # $darr[3] is the DepCondition
+ echo " <a href='packages.php?ID=".$darr[0]."'>".$darr[1].$darr[3]."</a>";
+ } else {
+ echo " <a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1].$darr[3]."</a>";
}
- reset($pkgsearch_vars);
- # $darr[3] is the DepCondition
- if ($darr[2] == 0) echo $url."'>".$darr[1].$darr[3]."</a>";
- else echo " <a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1].$darr[3]."</a>";
}
if (count($requiredby) > 0) {
@@ -135,20 +129,9 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
echo "<span class='boxSoftTitle'><span class='f3'>". __("Required by")."</span></span>";
while (list($k, $darr) = each($requiredby)) {
- $url = " <a href='packages.php?ID=".$darr[0];
- while(list($k, $var) = each($pkgsearch_vars)) {
- if (($var == "do_Orphans") && $_REQUEST[$var]) {
- $url .= "&amp;" . $var . "=1";
- } else {
- $url .= "&amp;".$var."=".rawurlencode(stripslashes($_REQUEST[$var]));
- }
- }
- reset($pkgsearch_vars);
-
if ($darr[2] == 0) {
- echo $url . "'>" . $darr[1] . "</a>";
- }
- else {
+ echo " <a href='packages.php?ID=".$darr[0]."'>".$darr[1]."</a>";
+ } else {
print "<a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1]."</a>";
}
}