summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authoreric <eric>2004-07-02 02:24:14 +0200
committereric <eric>2004-07-02 02:24:14 +0200
commit23589299786ac249ed16feb28a83f3e3da3d2829 (patch)
treeca219c9388f0ab65cd8fe21563959b8f054ac67d /web
parent993fcb7811d763368a6940730d3870b0013623c0 (diff)
downloadaur-23589299786ac249ed16feb28a83f3e3da3d2829.tar.gz
aur-23589299786ac249ed16feb28a83f3e3da3d2829.tar.xz
do_Details is getting close
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgfuncs.inc23
1 files changed, 14 insertions, 9 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 0c2e868c..15dd2d66 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -73,6 +73,7 @@ function package_sources($pkgid=0) {
# display package details
#
function package_details($id=0) {
+ global $pkgsearch_vars;
$q = "SELECT *,Location,Category ";
$q.= "FROM Packages,PackageLocations,PackageCategories ";
$q.= "WHERE Packages.LocationID = PackageLocations.ID ";
@@ -124,9 +125,9 @@ function package_details($id=0) {
print "</tr>\n";
print "<tr>\n";
print " <td colspan='2'><span class='f3'>".__("Maintainer").": ";
- if (isset($row["AURMaintainerUID"])) {
+ if ($row["AURMaintainerUID"]) {
$maintainer = username_from_id($row["AURMaintainerUID"]);
- } elseif (isset($row["MaintainerUID"])) {
+ } elseif ($row["MaintainerUID"]) {
$maintainer = username_from_id($row["MaintainerUID"]);
} else {
$maintainer = "None";
@@ -144,7 +145,12 @@ function package_details($id=0) {
print "<tr><td class='boxSoft'>";
$deps = package_dependencies($row["ID"]); # $deps[0] = array('id','name');
while (list($k, $darr) = each($deps)) {
- print $darr[0]." - ".$darr[1]."<br />\n";
+ $url = "<a href='/pkgsearch.php?do_Details=1&ID=".$darr[0];
+ while(list($k, $var) = each($pkgsearch_vars)) {
+ $url .= "&".$var."=".rawurlencode(stripslashes($_REQUEST[$var]));
+ }
+ reset($pkgsearch_vars);
+ print $url."'>".$darr[1]."</a><br />\n";
}
print "</td></tr>\n";
print "</table></td>";
@@ -156,8 +162,7 @@ function package_details($id=0) {
print "<tr><td class='boxSoft'>";
$sources = package_sources($row["ID"]); # $sources[0] = 'src';
while (list($k, $src) = each($sources)) {
- # TODO left off here... URLify
- print $src."<br />\n";
+ print "<a href='".$src."'>".$src."</a><br />\n";
}
print "</td></tr>\n";
print "</table></td>";
@@ -389,10 +394,10 @@ function pkg_search_page($SID="") {
break;
}
$q.= "LIMIT ".$O.", ".$PP;
- print $q."<br />\n";
- print "<pre>\n";
- print_r($_REQUEST);
- print "</pre>\n";
+ #print $q."<br />\n";
+ #print "<pre>\n";
+ #print_r($_REQUEST);
+ #print "</pre>\n";
$result = db_query($q, $dbh);
if (!$result) {