From 57db4814a47d2a40d4b74e3ae0df261bbfeb45b8 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 30 Aug 2015 16:32:34 +0200 Subject: Allow users to unflag packages they flagged themselves Sometimes, a user accidentally flags a package out-of-date. Allow users to unflag packages that they flagged themselves, thereby providing a way to undo these actions. Implements FS#46145. Signed-off-by: Lukas Fleischer --- web/template/pkg_details.php | 3 ++- web/template/pkgbase_actions.php | 2 +- web/template/pkgbase_details.php | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'web/template') diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index f4eed514..5ba3607a 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -21,8 +21,9 @@ $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; + $maintainers = array(); } +$unflaggers = array_merge($maintainers, array($row["FlaggerUID"])); $votes = $row['NumVotes']; $popularity = $row['Popularity']; diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index c7428ee6..dea348e3 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -11,7 +11,7 @@
  • - +
  • diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index d4304e3e..1012c4e6 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -20,8 +20,9 @@ $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; + $maintainers = array(); } +$unflaggers = array_merge($maintainers, array($row["FlaggerUID"])); $votes = $row['NumVotes']; $popularity = $row['Popularity']; -- cgit v1.2.3-24-g4f1b