From c60b15294a72d5a2be8e7d23fd1b4052ec944ec8 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Sat, 13 Oct 2012 17:49:12 -0500 Subject: [PATCH] [ticket/11103] Global moderators with m_approve permission never need approval They do not need to receive notifications if their post/topic is approved or disapproved PHPBB3-11103 --- phpBB/includes/notification/type/approve_post.php | 8 ++++++++ phpBB/includes/notification/type/approve_topic.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/phpBB/includes/notification/type/approve_post.php b/phpBB/includes/notification/type/approve_post.php index 9275ec2f6d..dbd2e4417f 100644 --- a/phpBB/includes/notification/type/approve_post.php +++ b/phpBB/includes/notification/type/approve_post.php @@ -57,6 +57,14 @@ class phpbb_notification_type_approve_post extends phpbb_notification_type_post return 'approve_post'; } + /** + * Is available + */ + public function is_available() + { + return !$this->auth->acl_get('m_approve'); + } + /** * Find the users who want to receive notifications * diff --git a/phpBB/includes/notification/type/approve_topic.php b/phpBB/includes/notification/type/approve_topic.php index 325ccd0eab..3608bfba85 100644 --- a/phpBB/includes/notification/type/approve_topic.php +++ b/phpBB/includes/notification/type/approve_topic.php @@ -57,6 +57,14 @@ class phpbb_notification_type_approve_topic extends phpbb_notification_type_topi return 'approve_topic'; } + /** + * Is available + */ + public function is_available() + { + return !$this->auth->acl_get('m_approve'); + } + /** * Find the users who want to receive notifications *