aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notification/manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/notification/manager.php')
-rw-r--r--phpBB/includes/notification/manager.php23
1 files changed, 15 insertions, 8 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;
}