mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/11103] UCP Notification option grouping
Also add the ability to specify an _EXPLAIN text for the notification option PHPBB3-11103
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user