aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-11-21 16:22:07 +0100
committerJoas Schilling <nickvergessen@gmx.de>2011-11-21 16:22:07 +0100
commit4c77903129749008cd08c346006d2a57cf6ff544 (patch)
treeb9d6811f263fd868c1ca0d29353f32ec2cd3d3df /phpBB/includes/functions_posting.php
parentff91c037c9ff575a6085c43406fa68f351842792 (diff)
downloadforums-4c77903129749008cd08c346006d2a57cf6ff544.tar
forums-4c77903129749008cd08c346006d2a57cf6ff544.tar.gz
forums-4c77903129749008cd08c346006d2a57cf6ff544.tar.bz2
forums-4c77903129749008cd08c346006d2a57cf6ff544.tar.xz
forums-4c77903129749008cd08c346006d2a57cf6ff544.zip
[ticket/10484] Use variables for sql_build_query() calls
It's easier for mods/extensions to extend the arrays. PHPBB3-10484
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4ca76344de..cb4fc86f21 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1005,7 +1005,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$mode = 'post_review';
}
- $sql = $db->sql_build_query('SELECT', array(
+ $sql_ary = array(
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
'FROM' => array(
@@ -1016,14 +1016,15 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'LEFT_JOIN' => array(
array(
'FROM' => array(ZEBRA_TABLE => 'z'),
- 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
- )
+ 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id',
+ ),
),
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
- AND u.user_id = p.poster_id'
- ));
+ AND u.user_id = p.poster_id',
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$bbcode_bitfield = '';