aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-10-20 21:22:06 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-10-20 21:22:06 -0500
commitde7e17b7321feebbefb5249febbbfe173e275ada (patch)
tree5d342eddfbdea0414c249c4b52f09ee781a2f9e6
parent94d682f77431add84867bb0b196ad0719b293606 (diff)
downloadforums-de7e17b7321feebbefb5249febbbfe173e275ada.tar
forums-de7e17b7321feebbefb5249febbbfe173e275ada.tar.gz
forums-de7e17b7321feebbefb5249febbbfe173e275ada.tar.bz2
forums-de7e17b7321feebbefb5249febbbfe173e275ada.tar.xz
forums-de7e17b7321feebbefb5249febbbfe173e275ada.zip
[ticket/11103] Notifications for subscriptions/bookmarks must obey ACP options
If bookmarks/subscriptions are disabled, they should not be listed in the UCP PHPBB3-11103
-rw-r--r--phpBB/includes/notification/type/bookmark.php8
-rw-r--r--phpBB/includes/notification/type/post.php8
-rw-r--r--phpBB/includes/notification/type/quote.php8
-rw-r--r--phpBB/includes/notification/type/topic.php8
4 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/includes/notification/type/bookmark.php b/phpBB/includes/notification/type/bookmark.php
index 4d5a1fd299..4bbe9bbbf4 100644
--- a/phpBB/includes/notification/type/bookmark.php
+++ b/phpBB/includes/notification/type/bookmark.php
@@ -42,6 +42,14 @@ class phpbb_notification_type_bookmark extends phpbb_notification_type_post
);
/**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_bookmarks'];
+ }
+
+ /**
* Find the users who want to receive notifications
*
* @param array $post Data from
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index 9317669e57..11202ee6e9 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -42,6 +42,14 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
);
/**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_topic_notify'];
+ }
+
+ /**
* Get the id of the item
*
* @param array $post The data from the post
diff --git a/phpBB/includes/notification/type/quote.php b/phpBB/includes/notification/type/quote.php
index e4b40e0aec..47337b1cda 100644
--- a/phpBB/includes/notification/type/quote.php
+++ b/phpBB/includes/notification/type/quote.php
@@ -49,6 +49,14 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post
);
/**
+ * Is available
+ */
+ public function is_available()
+ {
+ return true;
+ }
+
+ /**
* Find the users who want to receive notifications
*
* @param array $post Data from
diff --git a/phpBB/includes/notification/type/topic.php b/phpBB/includes/notification/type/topic.php
index db1d4028f0..99f7b5bee4 100644
--- a/phpBB/includes/notification/type/topic.php
+++ b/phpBB/includes/notification/type/topic.php
@@ -42,6 +42,14 @@ class phpbb_notification_type_topic extends phpbb_notification_type_base
);
/**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_forum_notify'];
+ }
+
+ /**
* Get the id of the item
*
* @param array $post The data from the post