summaryrefslogtreecommitdiffstats
path: root/modules-available/dozmod/hooks/main-warning.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/dozmod/hooks/main-warning.inc.php')
-rw-r--r--modules-available/dozmod/hooks/main-warning.inc.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules-available/dozmod/hooks/main-warning.inc.php b/modules-available/dozmod/hooks/main-warning.inc.php
index ffa87692..1778bb9d 100644
--- a/modules-available/dozmod/hooks/main-warning.inc.php
+++ b/modules-available/dozmod/hooks/main-warning.inc.php
@@ -4,8 +4,10 @@
* Show notification in main window if there are images that should be deleted and are waiting for confirmation
*/
-$res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'", array(), true);
-if (isset($res['cnt']) && $res['cnt'] > 0) {
- Message::addInfo('dozmod.images-pending-delete-exist', true, $res['cnt']);
-}
-unset($res);
+if (User::hasPermission('.dozmod.expiredimages.delete')) {
+ $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'", array(), true);
+ if (isset($res['cnt']) && $res['cnt'] > 0) {
+ Message::addInfo('dozmod.images-pending-delete-exist', true, $res['cnt']);
+ }
+ unset($res);
+} \ No newline at end of file