From ac8291a5dcbfe9edf53d627be1139fe52708d4ce Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 22 Sep 2007 12:09:00 -0700 Subject: Changes to bring the main arch site theme to the aur. --- web/lang/en/pkgfuncs_po.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/lang/en/pkgfuncs_po.inc') diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc index 220cdb3..dcd46f4 100644 --- a/web/lang/en/pkgfuncs_po.inc +++ b/web/lang/en/pkgfuncs_po.inc @@ -31,7 +31,7 @@ $_t["en"]["Error retrieving package details."] = "Error retrieving package detai $_t["en"]["Description"] = "Description"; -$_t["en"]["My Packages"] = "My Packages"; +$_t["en"]["My Packages"] = "My Pkgs"; $_t["en"]["Keywords"] = "Keywords"; @@ -151,4 +151,4 @@ $_t["en"]["License"] = "License"; $_t["en"]["unknown"] = "unknown"; -?> \ No newline at end of file +?> -- cgit v1.2.3-70-g09d2 From 61ddbc18e7836a3b2e334b23ea637a2a0eea9006 Mon Sep 17 00:00:00 2001 From: tardo Date: Sat, 22 Sep 2007 17:09:26 -0400 Subject: Reverse dependency lookup. FS 4556, 5269. Ugly hack, could use beautification. Also includes english translation addition. If url sources are too long, page could ugly... Signed-off-by: tardo --- web/lang/en/pkgfuncs_po.inc | 4 +++- web/lib/pkgfuncs.inc | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) (limited to 'web/lang/en/pkgfuncs_po.inc') diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc index 220cdb3..b6a704b 100644 --- a/web/lang/en/pkgfuncs_po.inc +++ b/web/lang/en/pkgfuncs_po.inc @@ -151,4 +151,6 @@ $_t["en"]["License"] = "License"; $_t["en"]["unknown"] = "unknown"; -?> \ No newline at end of file +$_t["en"]["Required by"] = "Required by"; + +?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index cd339c1..395200b 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -152,6 +152,25 @@ function package_dependencies($pkgid=0) { return $deps; } +# reverse deps by tardo +# +function package_required($pkgid=0) { + $deps = array(); + if ($pkgid) { + $dbh = db_connect(); + $q = "SELECT PackageID, Name, DummyPkg from PackageDepends, Packages "; + $q.= "WHERE PackageDepends.PackageID = Packages.ID "; + $q.= "AND PackageDepends.DepPkgID = "; + $q.= mysql_real_escape_string($pkgid); + $result = db_query($q, $dbh); + if (!$result) {return array();} + while ($row = mysql_fetch_row($result)) { + $deps[] = $row; + } + } + return $deps; +} + # create a dummy package and return it's Packages.ID if it already exists, # return the existing ID # @@ -402,6 +421,32 @@ function package_details($id=0, $SID="") { } reset($pkgsearch_vars); + // $darr[3] is the DepCondition + + if ($darr[2] == 0) print $url."'>".$darr[1].$darr[3]."
\n"; + else print "".$darr[1].$darr[3]."
\n"; + } + print "\n"; + print ""; + + # reverse-deps by tardo - could use some beautification + print " "; + print ""; + print "\n"; + print "\n"; print " "; + print "".__("The above files have been verified (by %h%s%h) and are safe to use.", array("", username_from_id($row["VerifiedBy"]), "")).""; } else { print "".__("Be careful! The above files may contain malicious code that can damage your system.").""; } -- cgit v1.2.3-70-g09d2 From 9cba3937d0847d1065b3da7322ffe7ea22108319 Mon Sep 17 00:00:00 2001 From: tardo Date: Sat, 22 Sep 2007 18:30:28 -0400 Subject: Cosmetic: Show flagged out of date on package page. Add a simple warning under "Tarball :: Files :: PKGBUILD" if package is out of date. Signed-off-by: tardo --- web/lang/en/pkgfuncs_po.inc | 2 ++ web/lib/pkgfuncs.inc | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'web/lang/en/pkgfuncs_po.inc') diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc index 4ab3cd6..1395062 100644 --- a/web/lang/en/pkgfuncs_po.inc +++ b/web/lang/en/pkgfuncs_po.inc @@ -155,4 +155,6 @@ $_t["en"]["Required by"] = "Required by"; $_t["en"]["The above files have been verified (by %h%s%h) and are safe to use."] = "The above files have been verified (by %h%s%h) and are safe to use."; +$_t["en"]["This package has been flagged out of date."] = "This package has been flagged out of date."; + ?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 3bbfcb7..5cab842 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -400,6 +400,10 @@ function package_details($id=0, $SID="") { print "".__("Be careful! The above files may contain malicious code that can damage your system.").""; } } + if ($row["OutOfDate"] == 1) { + print "\n"; + } print "\n"; print " "; print "\n"; -- cgit v1.2.3-70-g09d2
"; + print __("Required by")."
"; + $deps = package_required($row["ID"]); + while (list($k, $darr) = each($deps)) { + $url = "".$darr[1].$darr[3]."
\n"; -- cgit v1.2.3-70-g09d2 From adafc112f6f14a5ab7249a622da5d74a8f52a3ed Mon Sep 17 00:00:00 2001 From: tardo Date: Sat, 22 Sep 2007 17:14:14 -0400 Subject: Add link to TU's homepage in "Flagged safe by". FS 4138. Simple feature request. Not sure what purpose it serves. Signed-off-by: tardo --- web/lang/en/pkgfuncs_po.inc | 2 ++ web/lib/pkgfuncs.inc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'web/lang/en/pkgfuncs_po.inc') diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc index b6a704b..4ab3cd6 100644 --- a/web/lang/en/pkgfuncs_po.inc +++ b/web/lang/en/pkgfuncs_po.inc @@ -153,4 +153,6 @@ $_t["en"]["unknown"] = "unknown"; $_t["en"]["Required by"] = "Required by"; +$_t["en"]["The above files have been verified (by %h%s%h) and are safe to use."] = "The above files have been verified (by %h%s%h) and are safe to use."; + ?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 395200b..3bbfcb7 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -395,7 +395,7 @@ function package_details($id=0, $SID="") { print "
"; if ($row["Safe"]) { - print "".__("The above files have been verified (by %s) and are safe to use.", array(username_from_id($row["VerifiedBy"])))."
"; + print "".__("This package has been flagged out of date.")."