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>
This commit is contained in:
Dan McGee 2011-03-01 11:56:41 -06:00 committed by Lukas Fleischer
parent ef8fab0c12
commit ddbe6d0d33
2 changed files with 7 additions and 29 deletions

View file

@ -1,10 +1,6 @@
<?php <?php
include_once("config.inc"); 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 # 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 # 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 # display package details
# #
function package_details($id=0, $SID="") { function package_details($id=0, $SID="") {
global $pkgsearch_vars;
$atype = account_from_sid($SID); $atype = account_from_sid($SID);
$uid = uid_from_sid($SID); $uid = uid_from_sid($SID);

View file

@ -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>"; echo "<span class='boxSoftTitle'><span class='f3'>". __("Dependencies")."</span></span>";
while (list($k, $darr) = each($deps)) { while (list($k, $darr) = each($deps)) {
$url = " <a href='packages.php?ID=".$darr[0]; if ($darr[2] == 0) {
while(list($k, $var) = each($pkgsearch_vars)) { # $darr[3] is the DepCondition
if (($var == "do_Orphans") && $_REQUEST[$var]) { echo " <a href='packages.php?ID=".$darr[0]."'>".$darr[1].$darr[3]."</a>";
$url .= "&".$var."=1"; } else {
} else { echo " <a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1].$darr[3]."</a>";
$url .= "&".$var."=".rawurlencode(stripslashes($_REQUEST[$var]));
}
} }
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) { 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>"; echo "<span class='boxSoftTitle'><span class='f3'>". __("Required by")."</span></span>";
while (list($k, $darr) = each($requiredby)) { 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) { if ($darr[2] == 0) {
echo $url . "'>" . $darr[1] . "</a>"; echo " <a href='packages.php?ID=".$darr[0]."'>".$darr[1]."</a>";
} } else {
else {
print "<a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1]."</a>"; print "<a href='http://www.archlinux.org/packages/search/?q=".$darr[1]."'>".$darr[1]."</a>";
} }
} }