aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_notifications.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2012-11-09 07:40:08 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2012-11-09 07:40:08 -0600
commitf09ee162528d931aabc3f216410d02d3a072c21d (patch)
tree22f20e453d830258f65f318c39a59ff6354cabbc /phpBB/includes/ucp/ucp_notifications.php
parent03e348cf58c9b71ab00f0badb76a4426c2c71289 (diff)
downloadforums-f09ee162528d931aabc3f216410d02d3a072c21d.tar
forums-f09ee162528d931aabc3f216410d02d3a072c21d.tar.gz
forums-f09ee162528d931aabc3f216410d02d3a072c21d.tar.bz2
forums-f09ee162528d931aabc3f216410d02d3a072c21d.tar.xz
forums-f09ee162528d931aabc3f216410d02d3a072c21d.zip
[ticket/11103] Use phpBB Container to load types/methods
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/ucp/ucp_notifications.php')
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 8810ac9ce6..e8ceac3f59 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -48,15 +48,15 @@ class ucp_notifications
{
foreach($subscription_types as $type => $data)
{
- foreach($notification_methods as $method)
+ foreach($notification_methods as $method => $method_data)
{
- if ($request->is_set_post($type . '_' . $method) && (!isset($subscriptions[$type]) || !in_array($method, $subscriptions[$type])))
+ if ($request->is_set_post($type . '_' . $method_data['id']) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))
{
- $phpbb_notifications->add_subscription($type, 0, $method);
+ $phpbb_notifications->add_subscription($type, 0, $method_data['id']);
}
- else if (!$request->is_set_post($type . '_' . $method) && isset($subscriptions[$type]) && in_array($method, $subscriptions[$type]))
+ else if (!$request->is_set_post($type . '_' . $method_data['id']) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type]))
{
- $phpbb_notifications->delete_subscription($type, 0, $method);
+ $phpbb_notifications->delete_subscription($type, 0, $method_data['id']);
}
}
@@ -186,14 +186,14 @@ class ucp_notifications
'SUBSCRIBED' => (isset($subscriptions[$type])) ? true : false,
));
- foreach($notification_methods as $method)
+ foreach($notification_methods as $method => $method_data)
{
$template->assign_block_vars($block . '.notification_methods', array(
- 'METHOD' => $method,
+ 'METHOD' => $method_data['id'],
- 'NAME' => $user->lang(strtoupper($method)),
+ 'NAME' => $user->lang($method_data['lang']),
- 'SUBSCRIBED' => (isset($subscriptions[$type]) && in_array($method, $subscriptions[$type])) ? true : false,
+ 'SUBSCRIBED' => (isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type])) ? true : false,
));
}
}
@@ -212,12 +212,12 @@ class ucp_notifications
{
$notification_methods = $phpbb_notifications->get_subscription_methods();
- foreach($notification_methods as $method)
+ foreach($notification_methods as $method => $method_data)
{
$template->assign_block_vars($block, array(
- 'METHOD' => $method,
+ 'METHOD' => $method_data['id'],
- 'NAME' => $user->lang(strtoupper($method)),
+ 'NAME' => $user->lang($method_data['lang']),
));
}
}