summaryrefslogtreecommitdiffstats
path: root/web/template/pkgbase_details.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/template/pkgbase_details.php')
-rw-r--r--web/template/pkgbase_details.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index fb11e60c..406408b7 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_details.php
@@ -19,7 +19,8 @@ $updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($r
$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"]));
$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($row["OutOfDateTS"]));
-$urlpath = URL_DIR . substr($row['Name'], 0, 2) . "/" . $row['Name'];
+$package_url = config_get('options', 'package_url');
+$urlpath = $package_url . substr($row['Name'], 0, 2) . "/" . $row['Name'];
$pkgs = pkgbase_get_pkgnames($base_id);
?>
@@ -33,7 +34,7 @@ $pkgs = pkgbase_get_pkgnames($base_id);
<li><a href="<?= $urlpath . '/' . $row['Name'] ?>.tar.gz"><?= __('Download tarball') ?></a></li>
<li><a href="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?= __('Search wiki') ?></a></li>
<li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
- <?php if ($USE_VIRTUAL_URLS && $uid): ?>
+ <?php if (use_virtual_urls() && $uid): ?>
<?php if ($row["OutOfDateTS"] === NULL): ?>
<li>
<form action="<?= get_pkgbase_uri($row['Name']) . 'flag/'; ?>" method="post">
@@ -140,7 +141,7 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))):
<?php
if ($row["SubmitterUID"]):
if ($SID):
- if (!$USE_VIRTUAL_URLS):
+ if (!use_virtual_urls()):
?>
<td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?= htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($submitter) ?>"><?= html_format_username($submitter) ?></a></td>
<?php else: ?>
@@ -158,7 +159,7 @@ if ($row["SubmitterUID"]):
<?php
if ($row["MaintainerUID"]):
if ($SID):
- if (!$USE_VIRTUAL_URLS):
+ if (!use_virtual_urls()):
?>
<td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?= htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($maintainer) ?>"><?= html_format_username($maintainer) ?></a></td>
<?php else: ?>
@@ -176,7 +177,7 @@ if ($row["MaintainerUID"]):
<?php
if ($row["PackagerUID"]):
if ($SID):
- if (!$USE_VIRTUAL_URLS):
+ if (!use_virtual_urls()):
?>
<td><a href="<?= get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?= htmlspecialchars($row['PackagerUID'], ENT_QUOTES) ?>" title="<?= __('View account information for')?> <?= html_format_username($packager) ?>"><?= html_format_username($packager) ?></a></td>
<?php else: ?>
@@ -192,7 +193,7 @@ if ($row["PackagerUID"]):
<tr>
<th><?= __('Votes') . ': ' ?></th>
<?php if (has_credential(CRED_PKGBASE_LIST_VOTERS)): ?>
-<?php if ($USE_VIRTUAL_URLS): ?>
+<?php if (use_virtual_urls()): ?>
<td><a href="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?= $votes ?></a></td>
<?php else: ?>
<td><a href="<?= get_uri('/voters/'); ?>?N=<?= htmlspecialchars($row['Name'], ENT_QUOTES) ?>"><?= $votes ?></a></td>