aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notification
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/notification')
-rw-r--r--phpBB/includes/notification/manager.php23
-rw-r--r--phpBB/includes/notification/type/approve_post.php3
-rw-r--r--phpBB/includes/notification/type/approve_topic.php3
-rw-r--r--phpBB/includes/notification/type/base.php2
-rw-r--r--phpBB/includes/notification/type/disapprove_post.php3
-rw-r--r--phpBB/includes/notification/type/disapprove_topic.php3
-rw-r--r--phpBB/includes/notification/type/post.php10
-rw-r--r--phpBB/includes/notification/type/post_in_queue.php3
-rw-r--r--phpBB/includes/notification/type/report_pm.php3
-rw-r--r--phpBB/includes/notification/type/report_post.php1
-rw-r--r--phpBB/includes/notification/type/topic.php10
-rw-r--r--phpBB/includes/notification/type/topic_in_queue.php3
12 files changed, 51 insertions, 16 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php
index 16fdae6dd0..fc9b48c624 100644
--- a/phpBB/includes/notification/manager.php
+++ b/phpBB/includes/notification/manager.php
@@ -495,17 +495,24 @@ class phpbb_notification_manager
if ($class->is_available() && method_exists($class_name, 'get_item_type'))
{
- if ($class_name::$notification_option === false)
- {
- $subscription_types[$class_name::get_item_type()] = $class_name::get_item_type();
- }
- else
- {
- $subscription_types[$class_name::$notification_option['id']] = $class_name::$notification_option;
- }
+ $options = array_merge(array(
+ 'id' => $class_name::get_item_type(),
+ 'lang' => 'NOTIFICATION_TYPE_' . strtoupper($class_name::get_item_type()),
+ 'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
+ ), (($class_name::$notification_option !== false) ? $class_name::$notification_option : array()));
+
+ $subscription_types[$options['group']][$options['id']] = $options;
}
}
+ // Move Miscellaneous to the very last section
+ if (isset($subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']))
+ {
+ $miscellaneous = $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS'];
+ unset($subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']);
+ $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS'] = $miscellaneous;
+ }
+
return $subscription_types;
}
diff --git a/phpBB/includes/notification/type/approve_post.php b/phpBB/includes/notification/type/approve_post.php
index 68e8352a13..6ed9b6c67c 100644
--- a/phpBB/includes/notification/type/approve_post.php
+++ b/phpBB/includes/notification/type/approve_post.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_approve_post extends phpbb_notification_type_post
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'moderation_queue',
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
);
/**
diff --git a/phpBB/includes/notification/type/approve_topic.php b/phpBB/includes/notification/type/approve_topic.php
index f3a94e44b8..1ff5ae43bd 100644
--- a/phpBB/includes/notification/type/approve_topic.php
+++ b/phpBB/includes/notification/type/approve_topic.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_approve_topic extends phpbb_notification_type_topi
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'moderation_queue',
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
);
/**
diff --git a/phpBB/includes/notification/type/base.php b/phpBB/includes/notification/type/base.php
index 3aac8a7dd3..e8959d1352 100644
--- a/phpBB/includes/notification/type/base.php
+++ b/phpBB/includes/notification/type/base.php
@@ -34,7 +34,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use its default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = false;
diff --git a/phpBB/includes/notification/type/disapprove_post.php b/phpBB/includes/notification/type/disapprove_post.php
index 1bf9242c52..8044a3e0ea 100644
--- a/phpBB/includes/notification/type/disapprove_post.php
+++ b/phpBB/includes/notification/type/disapprove_post.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_disapprove_post extends phpbb_notification_type_ap
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'moderation_queue',
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
);
/**
diff --git a/phpBB/includes/notification/type/disapprove_topic.php b/phpBB/includes/notification/type/disapprove_topic.php
index f3e0be4883..04fec87014 100644
--- a/phpBB/includes/notification/type/disapprove_topic.php
+++ b/phpBB/includes/notification/type/disapprove_topic.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_disapprove_topic extends phpbb_notification_type_a
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'moderation_queue',
'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
);
/**
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index a4792cd7f2..ee26a8c33e 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -38,6 +38,16 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
protected $language_key = 'NOTIFICATION_POST';
/**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
* Get the type of notification this is
* phpbb_notification_type_
*/
diff --git a/phpBB/includes/notification/type/post_in_queue.php b/phpBB/includes/notification/type/post_in_queue.php
index 4f92eb157a..499fd1e8ed 100644
--- a/phpBB/includes/notification/type/post_in_queue.php
+++ b/phpBB/includes/notification/type/post_in_queue.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_post_in_queue extends phpbb_notification_type_post
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'needs_approval',
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
);
/**
diff --git a/phpBB/includes/notification/type/report_pm.php b/phpBB/includes/notification/type/report_pm.php
index 3619c5510c..440092afdc 100644
--- a/phpBB/includes/notification/type/report_pm.php
+++ b/phpBB/includes/notification/type/report_pm.php
@@ -48,11 +48,12 @@ class phpbb_notification_type_report_pm extends phpbb_notification_type_pm
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'report',
'lang' => 'NOTIFICATION_TYPE_REPORT',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
);
/**
diff --git a/phpBB/includes/notification/type/report_post.php b/phpBB/includes/notification/type/report_post.php
index d7a0d58167..d860fb1b38 100644
--- a/phpBB/includes/notification/type/report_post.php
+++ b/phpBB/includes/notification/type/report_post.php
@@ -53,6 +53,7 @@ class phpbb_notification_type_report_post extends phpbb_notification_type_post_i
public static $notification_option = array(
'id' => 'report',
'lang' => 'NOTIFICATION_TYPE_REPORT',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
);
/**
diff --git a/phpBB/includes/notification/type/topic.php b/phpBB/includes/notification/type/topic.php
index cb38b0274e..237f430003 100644
--- a/phpBB/includes/notification/type/topic.php
+++ b/phpBB/includes/notification/type/topic.php
@@ -38,6 +38,16 @@ class phpbb_notification_type_topic extends phpbb_notification_type_base
protected $language_key = 'NOTIFICATION_TOPIC';
/**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
* Get the type of notification this is
* phpbb_notification_type_
*/
diff --git a/phpBB/includes/notification/type/topic_in_queue.php b/phpBB/includes/notification/type/topic_in_queue.php
index 96f09cef9e..eb14c098e1 100644
--- a/phpBB/includes/notification/type/topic_in_queue.php
+++ b/phpBB/includes/notification/type/topic_in_queue.php
@@ -41,11 +41,12 @@ class phpbb_notification_type_topic_in_queue extends phpbb_notification_type_top
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
- * Array of data (including keys 'id' and 'lang')
+ * Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
'id' => 'needs_approval',
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
);
/**