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/mcp | |
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/mcp')
-rw-r--r-- | phpBB/includes/mcp/mcp_pm_reports.php | 2 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 46 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_reports.php | 10 |
3 files changed, 29 insertions, 29 deletions
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php index 03e4ed4722..d76bedba98 100644 --- a/phpBB/includes/mcp/mcp_pm_reports.php +++ b/phpBB/includes/mcp/mcp_pm_reports.php @@ -95,7 +95,7 @@ class mcp_pm_reports $phpbb_notifications = $phpbb_container->get('notification_manager'); - $phpbb_notifications->mark_notifications_read_by_parent('report_pm', $report_id, $user->data['user_id']); + $phpbb_notifications->mark_notifications_read_by_parent('notification.type.report_pm', $report_id, $user->data['user_id']); $pm_id = $report['pm_id']; $report_id = $report['report_id']; diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index b7e47163a6..bfd30a5be2 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -165,7 +165,7 @@ class mcp_queue { $post_id = (int) $topic_info[$topic_id]['topic_first_post_id']; - $phpbb_notifications->mark_notifications_read('topic_in_queue', $topic_id, $user->data['user_id']); + $phpbb_notifications->mark_notifications_read('notification.type.topic_in_queue', $topic_id, $user->data['user_id']); } else { @@ -173,7 +173,7 @@ class mcp_queue } } - $phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']); + $phpbb_notifications->mark_notifications_read('notification.type.post_in_queue', $post_id, $user->data['user_id']); $post_info = phpbb_get_post_data(array($post_id), 'm_approve', true); @@ -701,11 +701,11 @@ class mcp_queue // A single topic approval may also happen here, so handle deleting the respective notification. if (!$post_data['topic_posts_approved']) { - $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']); + $phpbb_notifications->delete_notifications('notification.type.topic_in_queue', $post_data['topic_id']); if ($post_data['post_visibility'] == ITEM_UNAPPROVED) { - $phpbb_notifications->add_notifications(array('topic'), $post_data); + $phpbb_notifications->add_notifications(array('notification.type.topic'), $post_data); } if ($post_data['post_visibility'] != ITEM_APPROVED) { @@ -721,18 +721,18 @@ class mcp_queue if ($post_data['post_visibility'] == ITEM_UNAPPROVED) { $phpbb_notifications->add_notifications(array( - 'bookmark', - 'post', + 'notification.type.bookmark', + 'notification.type.post', ), $post_data); } } - $phpbb_notifications->add_notifications(array('quote'), $post_data); - $phpbb_notifications->delete_notifications('post_in_queue', $post_id); + $phpbb_notifications->add_notifications(array('notification.type.quote'), $post_data); + $phpbb_notifications->delete_notifications('notification.type.post_in_queue', $post_id); $phpbb_notifications->mark_notifications_read(array( - 'quote', - 'bookmark', - 'post', + 'notification.type.quote', + 'notification.type.bookmark', + 'notification.type.post', ), $post_data['post_id'], $user->data['user_id']); // Notify Poster? @@ -745,11 +745,11 @@ class mcp_queue if (!$post_data['topic_posts_approved']) { - $phpbb_notifications->add_notifications('approve_post', $post_data); + $phpbb_notifications->add_notifications('notification.type.approve_post', $post_data); } else { - $phpbb_notifications->add_notifications('approve_topic', $post_data); + $phpbb_notifications->add_notifications('notification.type.approve_topic', $post_data); } } } @@ -921,7 +921,7 @@ class mcp_queue 'post_username' => $topic_data['topic_first_poster_name'], )); - $phpbb_notifications->delete_notifications('topic_in_queue', $topic_id); + $phpbb_notifications->delete_notifications('notification.type.topic_in_queue', $topic_id); // Only add notifications, if we are not reapproving post // When the topic was already approved, but was edited and @@ -930,17 +930,17 @@ class mcp_queue if ($topic_data['topic_visibility'] == ITEM_UNAPPROVED) { $phpbb_notifications->add_notifications(array( - 'quote', - 'topic', + 'notification.type.quote', + 'notification.type.topic', ), $topic_data); } - $phpbb_notifications->mark_notifications_read('quote', $topic_data['post_id'], $user->data['user_id']); - $phpbb_notifications->mark_notifications_read('topic', $topic_id, $user->data['user_id']); + $phpbb_notifications->mark_notifications_read('notification.type.quote', $topic_data['post_id'], $user->data['user_id']); + $phpbb_notifications->mark_notifications_read('notification.type.topic', $topic_id, $user->data['user_id']); if ($notify_poster) { - $phpbb_notifications->add_notifications('approve_topic', $topic_data); + $phpbb_notifications->add_notifications('notification.type.approve_topic', $topic_data); } } } @@ -1178,12 +1178,12 @@ class mcp_queue $topic_information[$topic_id]['topic_posts_softdeleted'] == 0 && $topic_information[$topic_id]['topic_posts_unapproved'] == $topic_posts_unapproved[$topic_id]; - $phpbb_notifications->delete_notifications('post_in_queue', $post_id); + $phpbb_notifications->delete_notifications('notification.type.post_in_queue', $post_id); // Do we disapprove the whole topic? Remove potential notifications if ($disapprove_all_posts_in_topic) { - $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']); + $phpbb_notifications->delete_notifications('notification.type.topic_in_queue', $post_data['topic_id']); } // Notify Poster? @@ -1228,13 +1228,13 @@ class mcp_queue { // If there is only 1 post when disapproving the topic, // we send the user a "disapprove topic" notification... - $phpbb_notifications->add_notifications('disapprove_topic', $post_data); + $phpbb_notifications->add_notifications('notification.type.disapprove_topic', $post_data); } else { // ... otherwise there are multiple unapproved posts and // all of them are disapproved as posts. - $phpbb_notifications->add_notifications('disapprove_post', $post_data); + $phpbb_notifications->add_notifications('notification.type.disapprove_post', $post_data); } } } diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index a7d8bf18d6..ba118e5db8 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -92,7 +92,7 @@ class mcp_reports $phpbb_notifications = $phpbb_container->get('notification_manager'); - $phpbb_notifications->mark_notifications_read('report_post', $post_id, $user->data['user_id']); + $phpbb_notifications->mark_notifications_read('notification.type.report_post', $post_id, $user->data['user_id']); if (!$report_id && $report['report_closed']) { @@ -631,12 +631,12 @@ function close_report($report_id_list, $mode, $action, $pm = false) if ($pm) { add_log('mod', 0, 0, 'LOG_PM_REPORT_' . strtoupper($action) . 'D', $post_info[$report['pm_id']]['message_subject']); - $phpbb_notifications->delete_notifications('report_pm', $report['pm_id']); + $phpbb_notifications->delete_notifications('notification.type.report_pm', $report['pm_id']); } else { add_log('mod', $post_info[$report['post_id']]['forum_id'], $post_info[$report['post_id']]['topic_id'], 'LOG_REPORT_' . strtoupper($action) . 'D', $post_info[$report['post_id']]['post_subject']); - $phpbb_notifications->delete_notifications('report_post', $report['post_id']); + $phpbb_notifications->delete_notifications('notification.type.report_post', $report['post_id']); } } @@ -654,7 +654,7 @@ function close_report($report_id_list, $mode, $action, $pm = false) if ($pm) { - $phpbb_notifications->add_notifications('report_pm_closed', array_merge($post_info[$post_id], array( + $phpbb_notifications->add_notifications('notification.type.report_pm_closed', array_merge($post_info[$post_id], array( 'reporter' => $reporter['user_id'], 'closer_id' => $user->data['user_id'], 'from_user_id' => $post_info[$post_id]['author_id'], @@ -662,7 +662,7 @@ function close_report($report_id_list, $mode, $action, $pm = false) } else { - $phpbb_notifications->add_notifications('report_post_closed', array_merge($post_info[$post_id], array( + $phpbb_notifications->add_notifications('notification.type.report_post_closed', array_merge($post_info[$post_id], array( 'reporter' => $reporter['user_id'], 'closer_id' => $user->data['user_id'], ))); |