aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-11-20 18:14:48 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-11-20 22:54:16 -0600
commit2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b (patch)
treeab584092e7e54f50a15dd9a22ed5b31200ea03f1 /phpBB/includes/mcp
parentd2187424da6ff2e0d4a69a6e21bac7e92f68335a (diff)
downloadforums-2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b.tar
forums-2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b.tar.gz
forums-2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b.tar.bz2
forums-2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b.tar.xz
forums-2afb8b9df873c3f9572a32ab7a62ea8ba8d8a45b.zip
[ticket/11103] Create user loader class, update for DIC
Create a very basic user loader class to handle querying/storing user data in a centralized location. Use DIC collection service for notification types/methods. Cleanup unused dependencies. Fix some other issues. PHPBB3-11103
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php28
-rw-r--r--phpBB/includes/mcp/mcp_reports.php10
3 files changed, 20 insertions, 20 deletions
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index 2a52a0b4fd..4ba1b2fd0c 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -90,7 +90,7 @@ class mcp_pm_reports
trigger_error('NO_REPORT');
}
- $phpbb_notifications->mark_notifications_read_by_parent('phpbb_notification_type_report_pm', $report_id, $user->data['user_id']);
+ $phpbb_notifications->mark_notifications_read_by_parent('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 f13ce914bf..4a3d443006 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -86,7 +86,7 @@ class mcp_queue
{
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
- $phpbb_notifications->mark_notifications_read('phpbb_notification_type_topic_in_queue', $topic_id, $user->data['user_id']);
+ $phpbb_notifications->mark_notifications_read('topic_in_queue', $topic_id, $user->data['user_id']);
}
else
{
@@ -94,7 +94,7 @@ class mcp_queue
}
}
- $phpbb_notifications->mark_notifications_read('phpbb_notification_type_post_in_queue', $post_id, $user->data['user_id']);
+ $phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
$post_info = get_post_data(array($post_id), 'm_approve', true);
@@ -610,28 +610,28 @@ function approve_post($post_id_list, $id, $mode)
{
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
{
- $phpbb_notifications->delete_notifications('phpbb_notification_type_topic_in_queue', $post_data['topic_id']);
+ $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
- $phpbb_notifications->add_notifications('phpbb_notification_type_topic', $post_data);
+ $phpbb_notifications->add_notifications('topic', $post_data);
if ($notify_poster)
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_approve_topic', $post_data);
+ $phpbb_notifications->add_notifications('approve_topic', $post_data);
}
}
else
{
- $phpbb_notifications->delete_notifications('phpbb_notification_type_post_in_queue', $post_id);
+ $phpbb_notifications->delete_notifications('post_in_queue', $post_id);
$phpbb_notifications->add_notifications(array(
- 'phpbb_notification_type_quote',
- 'phpbb_notification_type_bookmark',
- 'phpbb_notification_type_post',
+ 'quote',
+ 'bookmark',
+ 'post',
), $post_data);
if ($notify_poster)
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_approve_post', $post_data);
+ $phpbb_notifications->add_notifications('approve_post', $post_data);
}
}
}
@@ -859,11 +859,11 @@ function disapprove_post($post_id_list, $id, $mode)
{
if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
{
- $phpbb_notifications->delete_notifications('phpbb_notification_type_topic_in_queue', $post_data['topic_id']);
+ $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
}
else
{
- $phpbb_notifications->delete_notifications('phpbb_notification_type_post_in_queue', $post_id);
+ $phpbb_notifications->delete_notifications('post_in_queue', $post_id);
}
}
@@ -909,14 +909,14 @@ function disapprove_post($post_id_list, $id, $mode)
{
if ($notify_poster)
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_disapprove_topic', $post_data);
+ $phpbb_notifications->add_notifications('disapprove_topic', $post_data);
}
}
else
{
if ($notify_poster)
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_disapprove_post', $post_data);
+ $phpbb_notifications->add_notifications('disapprove_post', $post_data);
}
}
}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 41cdbc75d6..85723ab3f7 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -88,7 +88,7 @@ class mcp_reports
trigger_error('NO_REPORT');
}
- $phpbb_notifications->mark_notifications_read('phpbb_notification_type_report_post', $post_id, $user->data['user_id']);
+ $phpbb_notifications->mark_notifications_read('report_post', $post_id, $user->data['user_id']);
if (!$report_id && $report['report_closed'])
{
@@ -647,20 +647,20 @@ function close_report($report_id_list, $mode, $action, $pm = false)
if ($pm)
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_report_pm_closed', array_merge($post_info[$post_id], array(
+ $phpbb_notifications->add_notifications('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'],
)));
- $phpbb_notifications->delete_notifications('phpbb_notification_type_report_pm', $post_id);
+ $phpbb_notifications->delete_notifications('report_pm', $post_id);
}
else
{
- $phpbb_notifications->add_notifications('phpbb_notification_type_report_post_closed', array_merge($post_info[$post_id], array(
+ $phpbb_notifications->add_notifications('report_post_closed', array_merge($post_info[$post_id], array(
'reporter' => $reporter['user_id'],
'closer_id' => $user->data['user_id'],
)));
- $phpbb_notifications->delete_notifications('phpbb_notification_type_report_post', $post_id);
+ $phpbb_notifications->delete_notifications('report_post', $post_id);
}
}
}