summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-11 13:31:40 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-11 13:36:27 +0200
commitd1fd6f4897b1e7891375c3b170e2cd8854836517 (patch)
tree96cc0a3f418f5b3ac2a853c273d280d4c2d23077 /web/template/pkg_details.php
parentef142b23127c910f20b3321c051619f475580797 (diff)
downloadaur-d1fd6f4897b1e7891375c3b170e2cd8854836517.tar.gz
aur-d1fd6f4897b1e7891375c3b170e2cd8854836517.tar.xz
Make URIs to the individual cgit pages configurable
Make the locations of the PKGBUILD preview, the log and the snapshot tarball configurable. This increases flexibility and simplifies the code a bit. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 7c68c308..e50f0293 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -1,6 +1,8 @@
<?php
-$cgit_uri = config_get('options', 'cgit_uri');
+$pkgbuild_uri = sprintf(config_get('options', 'pkgbuild_uri'), urlencode($row['BaseName']));
+$log_uri = sprintf(config_get('options', 'log_uri'), urlencode($row['BaseName']));
+$snapshot_uri = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['BaseName']));
$git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['BaseName']));
$git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['BaseName']));
@@ -82,10 +84,10 @@ $sources = pkg_sources($row["ID"]);
<h4><?= __('Package Actions') ?></h4>
<ul class="small">
<li>
- <a href="<?= $cgit_uri . '/tree/PKGBUILD?h=' . urlencode($row['BaseName']) ?>"><?= __('View PKGBUILD') ?></a> /
- <a href="<?= $cgit_uri . '/log/?h=' . urlencode($row['BaseName']) ?>"><?= __('View Changes') ?></a>
+ <a href="<?= $pkgbuild_uri ?>"><?= __('View PKGBUILD') ?></a> /
+ <a href="<?= $log_uri ?>"><?= __('View Changes') ?></a>
</li>
- <li><a href="<?= $cgit_uri . '/snapshot/' . urlencode($row['BaseName']) . '.tar.gz' ?>"><?= __('Download snapshot') ?></a>
+ <li><a href="<?= $snapshot_uri ?>"><?= __('Download snapshot') ?></a>
<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 ($uid): ?>