index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-27 21:10:29 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-27 21:10:29 +0200 |
commit | 4013377ff6f89fd52541af373a8c61c1a9d9aead (patch) | |
tree | 1fb19fdf2d82cc258c3b9eb7b0ce4b317cbf472b /packages/pkginfo.php | |
parent | 4eb3face7bd2fc2e3fd62139fe7e110ddba499a9 (diff) |
-rw-r--r-- | packages/pkginfo.php | 16 |
diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 7f17963..b910266 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -35,7 +35,8 @@ require_once BASE . "/lib/style.php"; "`git_repositories`.`name` AS `git_repo`," . "`package_sources`.`uses_upstream`," . "`package_sources`.`uses_modification`," . - "`binary_packages_in_repositories`.`last_moved`" . + "`binary_packages_in_repositories`.`last_moved`," . + "`sr`.`name` AS `stable_repo`" . " FROM `binary_packages`" . " JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id`" . " JOIN `binary_packages_in_repositories` ON `binary_packages`.`id`=`binary_packages_in_repositories`.`package`" . @@ -45,9 +46,16 @@ require_once BASE . "/lib/style.php"; " JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id`" . " JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository`=`upstream_repositories`.`id`" . " JOIN `git_repositories` ON `upstream_repositories`.`git_repository`=`git_repositories`.`id`" . + " JOIN `repository_moves` ON `upstream_repositories`.`id`=`repository_moves`.`upstream_package_repository`" . + " JOIN `repositories` AS `sr` ON `sr`.`id`=`repository_moves`.`to_repository`" . " WHERE `binary_packages`.`pkgname`=from_base64(\"" . base64_encode($_GET["pkgname"]) . "\")" . " AND `architectures`.`name`=from_base64(\"" . base64_encode($_GET["arch"]) . "\")" . - " AND `repositories`.`name`=from_base64(\"" . base64_encode($_GET["repo"]) . "\")" + " AND `repositories`.`name`=from_base64(\"" . base64_encode($_GET["repo"]) . "\")" . + " AND NOT EXISTS (" . + "SELECT 1" . + " FROM `repository_moves` AS `rm`" . + " WHERE `rm`.`from_repository`=`sr`.`id`" . + ")" ); if ($mysql_result -> num_rows != 1) @@ -276,14 +284,14 @@ require_once BASE . "/lib/style.php"; if ($content["uses_modification"]) { print " <li>\n"; print " <a href=\"https://git.archlinux32.org/archlinux32/packages/src/branch/master/"; - print $content["git_repo"]; + print $content["stable_repo"]; print "/"; print $content["pkgbase"]; print "\" title=\"View archlinux32's source files for "; print $content["pkgname"]; print "\">Archlinux32's Source Files</a> /\n"; print " <a href=\"https://git.archlinux32.org/archlinux32/packages/commits/branch/master/"; - print $content["git_repo"]; + print $content["stable_repo"]; print "/"; print $content["pkgbase"]; print "\" title=\"View upstream's changes for "; |