summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-20 12:44:37 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-20 14:27:00 +0200
commita5fd2bb39d8bb655ffcc05decec0bdba3eda7e75 (patch)
treeaa94a7638a8a0cb04fe2e63c4c6aee05284824cc /web/template/pkg_details.php
parent5eb7354e7d67833ec3ef582bb9ef74550f60f318 (diff)
downloadaurweb-a5fd2bb39d8bb655ffcc05decec0bdba3eda7e75.tar.xz
Let co-maintainers unflag the package
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 2f121e7..fb81442 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -18,6 +18,12 @@ $maintainer = username_from_id($row["MaintainerUID"]);
$comaintainers = pkgbase_get_comaintainers($base_id);
$packager = username_from_id($row["PackagerUID"]);
+if ($row["MaintainerUID"] !== NULL) {
+ $maintainers = array_merge(array($row["MaintainerUID"]), pkgbase_get_comaintainer_uids(array($base_id)));
+} else {
+ $maintainers = NULL;
+}
+
$votes = $row['NumVotes'];
# In case of wanting to put a custom message
@@ -99,7 +105,7 @@ $sources = pkg_sources($row["ID"]);
<input type="submit" class="button text-button" name="do_Flag" value="<?= __('Flag package out-of-date') ?>" />
</form>
</li>
- <?php elseif (($row["OutOfDateTS"] !== NULL) && has_credential(CRED_PKGBASE_UNFLAG, array($row["MaintainerUID"]))): ?>
+ <?php elseif (($row["OutOfDateTS"] !== NULL) && has_credential(CRED_PKGBASE_UNFLAG, $maintainers)): ?>
<li>
<form action="<?= get_pkgbase_uri($row['BaseName']) . 'unflag/'; ?>" method="post">
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />