Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/pkginfo.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/pkginfo.php b/packages/pkginfo.php
index 0717aa1..7cf1e5d 100644
--- a/packages/pkginfo.php
+++ b/packages/pkginfo.php
@@ -1,6 +1,10 @@
<?php
require_once "../init.php";
+$uri_prefix = explode('/', $_SERVER['REQUEST_URI']);
+$uri_prefix = array_slice($uri_prefix, 0, -4);
+$uri_prefix = implode('/', $uri_prefix) . '/';
+
if (($_GET['repo']=='i686') || ($_GET['repo']=='i486') || ($_GET['repo']=='any')) {
header('Location: /' . $_GET['repo'] . '/' . $_GET['repo_arch'] . '/' . $_GET['pkgname'] . '/');
error_log('needed redirect URL: ' . $_SERVER['REQUEST_URI'] . ', HTTP_USER_AGENT: ' . $_SERVER['HTTP_USER_AGENT'] . ', HTTP_REFERER: ' . $_SERVER['HTTP_REFERER']);
@@ -458,7 +462,7 @@ if (count($elsewhere)>0) {
print " <ul>\n";
print " <li>\n";
if ($subst["is_on_master_mirror"]) {
- print " <a href=\"/" . $subst["repo_arch"] . "/" . $subst["repo"] . "/" . $subst["pkgname"] ."/\"";
+ print " <a href=\"" . $uri_prefix . $subst["repo_arch"] . "/" . $subst["repo"] . "/" . $subst["pkgname"] ."/\"";
print " title=\"Package details for " . $subst["pkgname"] ."\">";
}
if ($subst["is_to_be_deleted"])
@@ -490,7 +494,7 @@ if (count($elsewhere)>0) {
Architecture:
</th>
<td>
- <a href="/?arch=<?php
+ <a href="<?php print $uri_prefix; ?>?arch=<?php
print $content["arch"];
?>" title="Browse packages for <?php
print $content["arch"];
@@ -504,7 +508,7 @@ if (count($elsewhere)>0) {
Repository:
</th>
<td>
- <a href="/?repo=<?php
+ <a href="<?php print $uri_prefix; ?>?repo=<?php
print urlencode($content["repo_arch"] . "/" . $content["repo"]);
?>" title="Browse the <?php
print $content["repo_arch"] . "/" . $content["repo"];
@@ -524,7 +528,7 @@ if ($count > 1 || $content["pkgname"] != $content["pkgbase"]) {
foreach ($content["split_packages"] as $split_package) {
print " ";
if ($split_package["pkgname"] != $content["pkgname"]) {
- print "<a href=\"/" . $split_package["repo_arch"];
+ print "<a href=\"" . $uri_prefix . $split_package["repo_arch"];
print "/" . $split_package["repository"];
print "/" . $split_package["pkgname"];
print "/\">";
@@ -636,7 +640,7 @@ if ($count > 1 || $content["pkgname"] != $content["pkgbase"]) {
if (!$first)
print ", ";
$first = false;
- print "<a href=\"/".$d_p["repo_arch"]."/".$d_p["repo"]."/".$d_p["pkgname"]."/\" ";
+ print "<a href=\"" . $uri_prefix . $d_p["repo_arch"] . "/" . $d_p["repo"] . "/" . $d_p["pkgname"] . "/\" ";
print "title=\"View package details for ".$d_p["pkgname"]."\">";
if ($d_p["is_to_be_deleted"])
print "<s>";
@@ -670,7 +674,7 @@ if ($count > 1 || $content["pkgname"] != $content["pkgbase"]) {
if ($dep["install_target"] != $content["pkgname"])
print $dep["install_target"] . " (";
if ($dep["is_on_master_mirror"]=="1") {
- print "<a href=\"/".$dep["repo_arch"]."/".$dep["repo"]."/".$dep["pkgname"]."/\" ";
+ print "<a href=\"" . $uri_prefix . $dep["repo_arch"] . "/" . $dep["repo"] . "/" . $dep["pkgname"] . "/\" ";
print "title=\"View package details for ".$dep["pkgname"]."\">";
}
if ($dep["is_to_be_deleted"])