summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 16:30:45 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 16:32:20 +0200
commit6ed9da2c3e56ccf776308f680791099c464b9ab2 (patch)
tree0300b4179ec39e6d103ffbe5b3d78a96b7404591
parentace64c96d3f683eaff0f64cf3fb5275e03ed6ca4 (diff)
downloadaur-6ed9da2c3e56ccf776308f680791099c464b9ab2.tar.gz
aur-6ed9da2c3e56ccf776308f680791099c464b9ab2.tar.xz
Do not show package base page of non-split packages
When trying to access the package base page of non-split packages, redirect to the package details page since the package base page doesn't contain any additional information in that case. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/html/pkgbase.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 24bbbdc3..3369049e 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -115,6 +115,12 @@ if (check_token()) {
}
}
+$pkgs = pkgbase_get_pkgnames($base_id);
+if (count($pkgs) == 1) {
+ /* Not a split package. Redirect to the package page. */
+ header('Location: ' . get_pkg_uri($pkgs[0]));
+}
+
$details = pkgbase_get_details($base_id);
html_header($title, $details);
?>