diff options
author | brunoais <brunoaiss@gmail.com> | 2015-03-01 19:55:43 +0000 |
---|---|---|
committer | brunoais <brunoaiss@gmail.com> | 2015-03-01 19:55:43 +0000 |
commit | 5ad69bbecf49522734c340356f5d9e8303720a9c (patch) | |
tree | 23069d066c693157c749414a93471e259c97703e /phpBB/includes/mcp | |
parent | 18de60c0e099c2af41d853cfeb5799a09e0da630 (diff) | |
download | forums-5ad69bbecf49522734c340356f5d9e8303720a9c.tar forums-5ad69bbecf49522734c340356f5d9e8303720a9c.tar.gz forums-5ad69bbecf49522734c340356f5d9e8303720a9c.tar.bz2 forums-5ad69bbecf49522734c340356f5d9e8303720a9c.tar.xz forums-5ad69bbecf49522734c340356f5d9e8303720a9c.zip |
[ticket/13664] From string query in mcp_front unapproved posts to built query
PHPBB3-13664
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r-- | phpBB/includes/mcp/mcp_front.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 500db55456..81960e5cd2 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -41,10 +41,15 @@ function mcp_front_view($id, $mode, $action) if (!empty($forum_list)) { - $sql = 'SELECT COUNT(post_id) AS total - FROM ' . POSTS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forum_list) . ' - AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)); + $sql_ary = array( + 'SELECT' => 'COUNT(post_id) AS total', + 'FROM' => array( + POSTS_TABLE => '', + ), + 'WHERE' => $db->sql_in_set('forum_id', $forum_list) . ' + AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $total = (int) $db->sql_fetchfield('total'); $db->sql_freeresult($result); |