diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 14:24:07 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 14:24:07 +0200 |
commit | 9aed758c1397c31b979f4aca51249c73d21bd6f5 (patch) | |
tree | 03c13aa87f3aa0ca892fe8bca937d2de7054bff5 /phpBB/mcp.php | |
parent | [ticket/9657] Make content visibility a service and inject everything (diff) | |
download | phpbb-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.gz phpbb-9aed758c1397c31b979f4aca51249c73d21bd6f5.tar.bz2 phpbb-9aed758c1397c31b979f4aca51249c73d21bd6f5.zip |
[ticket/9657] Use the service instead of the static class
PHPBB3-9657
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r-- | phpBB/mcp.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php index a0e106e27d..5beea45c7d 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -502,7 +502,7 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false) */ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false) { - global $auth, $db, $user, $config; + global $auth, $db, $user, $config, $phpbb_container; $rowset = array(); @@ -532,6 +532,8 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false) WHERE " . $db->sql_in_set('f.forum_id', $forum_id); $result = $db->sql_query($sql); + $phpbb_content_visibility = $phpbb_container->get('content.visibility'); + while ($row = $db->sql_fetchrow($result)) { if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id'])) @@ -539,7 +541,7 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false) continue; } - $row['forum_topics_approved'] = phpbb_content_visibility::get_count('forum_topics', $row, $row['forum_id']); + $row['forum_topics_approved'] = $phpbb_content_visibility->get_count('forum_topics', $row, $row['forum_id']); $rowset[$row['forum_id']] = $row; } |