From 58218c6f5dffff90c5f3103b8daa9e322643af6d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 14 Apr 2018 11:26:48 +0200 Subject: packages/pkginfo.php: include "elsewhere information" --- packages/pkginfo.php | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/packages/pkginfo.php b/packages/pkginfo.php index e71951f..fac10df 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -169,6 +169,31 @@ $content = array_merge($mysql_content,$json_content); + if (! $mysql_result = $mysql -> query( + "SELECT " . + "`binary_packages`.`pkgname` AS `pkgname`," . + "`repositories`.`name` AS `repo`," . + "`architectures`.`name` AS `arch`," . + "CONCAT(" . + "IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," . + "`binary_packages`.`pkgver`,\"-\"," . + "`binary_packages`.`pkgrel`,\".\"," . + "`binary_packages`.`sub_pkgrel`" . + ") AS `version`" . + " FROM `binary_packages` " . + " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" . + " JOIN `repositories` ON `binary_packages`.`repository`=`repositories`.`id`" . + " JOIN `binary_packages` AS `original`" . + " ON `binary_packages`.`pkgname`=`original`.`pkgname`" . + " AND `binary_packages`.`id`!=`original`.`id`" . + " WHERE `original`.`id`=" . $mysql_content["id"] + )) + die_500("Query failed: " . $mysql->error); + + $elsewhere = array(); + while ($row = $mysql_result -> fetch_assoc()) + $elsewhere[] = $row; + ?> @@ -236,7 +261,22 @@ - +0) { + print "
\n"; + print "

Versions Elsewhere

\n"; + foreach ($elsewhere as $subst) { + print "\n"; + } + print "
\n"; +} + +?>
-- cgit v1.2.3-70-g09d2