aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_queue.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-07-11 14:24:07 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-07-11 14:24:07 +0200
commit9aed758c1397c31b979f4aca51249c73d21bd6f5 (patch)
tree03c13aa87f3aa0ca892fe8bca937d2de7054bff5 /phpBB/includes/mcp/mcp_queue.php
parent9f89cb4cfbbd46ad45a9c7942fc2233b489bb076 (diff)
downloadforums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar
forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.gz
forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.bz2
forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.xz
forums-9aed758c1397c31b979f4aca51249c73d21bd6f5.zip
[ticket/9657] Use the service instead of the static class
PHPBB3-9657
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index a42ae6c48c..514d7bc4ee 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -634,9 +634,10 @@ class mcp_queue
);
}
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
foreach ($topic_info as $topic_id => $topic_data)
{
- phpbb_content_visibility::set_post_visibility(ITEM_APPROVED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '', isset($topic_data['first_post']), isset($topic_data['last_post']));
+ $phpbb_content_visibility->set_post_visibility(ITEM_APPROVED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '', isset($topic_data['first_post']), isset($topic_data['last_post']));
}
if (sizeof($post_info) >= 1)
@@ -759,7 +760,7 @@ class mcp_queue
static public function approve_topics($action, $topic_id_list, $id, $mode)
{
global $db, $template, $user, $config;
- global $phpEx, $phpbb_root_path, $request;
+ global $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
@@ -784,9 +785,10 @@ class mcp_queue
{
$notify_poster = ($action == 'approve' && isset($_REQUEST['notify_poster'])) ? true : false;
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
foreach ($topic_info as $topic_id => $topic_data)
{
- phpbb_content_visibility::set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
+ $phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_data['forum_id']}&amp;t={$topic_id}");