summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-10-10 12:27:13 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-10-10 12:29:18 +0200
commita1bee1a21e3ac4ee475332bfda63fa502ba51694 (patch)
treed4ec48c8e17fc20232e4a78a2c3794377db9977b /web/template
parent725a4778dbe51873e1ab1219339397ad50d78e61 (diff)
downloadaur-a1bee1a21e3ac4ee475332bfda63fa502ba51694.tar.gz
aur-a1bee1a21e3ac4ee475332bfda63fa502ba51694.tar.xz
Add support for architecture-specific sources
As a follow-up to 4d7da95 (Add support for architecture-specific fields, 2014-08-10), handle architecture-specific source fields as well. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/pkg_details.php24
1 files changed, 5 insertions, 19 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 3752e1aa..d09b3d86 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -379,28 +379,14 @@ if ($row["PackagerUID"]):
<div id="pkgfiles" class="listing">
<h3><?= __('Sources') ?></h3>
</div>
-<?php if (count($sources) > 0): ?>
+ <?php if (count($sources) > 0): ?>
<div>
<ul id="pkgsrcslist">
-<?php
- while (list($k, $src) = each($sources)):
- $src = explode('::', $src);
- $parsed_url = parse_url($src[0]);
-
- # It is an external source
- if (isset($parsed_url['scheme']) || isset($src[1])):
-?>
- <li><a href="<?= htmlspecialchars((isset($src[1]) ? $src[1] : $src[0]), ENT_QUOTES) ?>"><?= htmlspecialchars($src[0]) ?> </a></li>
-<?php
- else:
- # It is presumably an internal source
- $src = $src[0];
-?>
- <li><?= htmlspecialchars($src) ?></li>
- <?php endif; ?>
- <?php endwhile; ?>
+ <?php while (list($k, $src) = each($sources)): ?>
+ <li><?= pkg_source_link($src[0], $src[1]) ?></li>
+ <?php endwhile; ?>
</ul>
</div>
-<?php endif; ?>
+ <?php endif; ?>
</div>
</div>