diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-08-16 21:06:10 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-08-16 21:46:03 +0200 |
commit | fe8096753566f4beb708e9070d8789eebdd1e70b (patch) | |
tree | cc1eb23e00a105adb4dac1089bcc86f43d4c5030 /phpBB/includes/ucp | |
parent | e9f5b9d657b92f6d53d76c28ba4de64722700e7e (diff) | |
download | forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.gz forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.bz2 forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.xz forums-fe8096753566f4beb708e9070d8789eebdd1e70b.zip |
[ticket/12990] Use the full services name for the notification's types
PHPBB3-12990
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_notifications.php | 10 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index 53dec89aad..6e357b260a 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -111,7 +111,7 @@ class ucp_activate if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password) { $phpbb_notifications = $phpbb_container->get('notification_manager'); - $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']); + $phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']); include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index 0ed3084e9f..690a16c5f6 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -58,28 +58,28 @@ class ucp_notifications { foreach($notification_methods as $method => $method_data) { - if ($request->is_set_post($type . '_' . $method_data['id']) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type]))) + if ($request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type]))) { $phpbb_notifications->add_subscription($type, 0, $method_data['id']); } - else if (!$request->is_set_post($type . '_' . $method_data['id']) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type])) + else if (!$request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type])) { $phpbb_notifications->delete_subscription($type, 0, $method_data['id']); } } - if ($request->is_set_post($type . '_notification') && !isset($subscriptions[$type])) + if ($request->is_set_post(str_replace('.', '_', $type) . '_notification') && !isset($subscriptions[$type])) { $phpbb_notifications->add_subscription($type); } - else if (!$request->is_set_post($type . '_notification') && isset($subscriptions[$type])) + else if (!$request->is_set_post(str_replace('.', '_', $type) . '_notification') && isset($subscriptions[$type])) { $phpbb_notifications->delete_subscription($type); } } } - meta_refresh(3, $this->u_action); + //meta_refresh(3, $this->u_action); $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); trigger_error($message); } diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index a303197563..06baf7e5f2 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -389,7 +389,7 @@ class ucp_register if ($config['require_activation'] == USER_ACTIVATION_ADMIN) { $phpbb_notifications = $phpbb_container->get('notification_manager'); - $phpbb_notifications->add_notifications('admin_activate_user', array( + $phpbb_notifications->add_notifications('notification.type.admin_activate_user', array( 'user_id' => $user_id, 'user_actkey' => $user_row['user_actkey'], 'user_regdate' => $user_row['user_regdate'], |