1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

[ticket/10484] Use variables for sql_build_query() calls

It's easier for mods/extensions to extend the arrays.

PHPBB3-10484
This commit is contained in:
Joas Schilling
2011-11-21 16:22:07 +01:00
parent ff91c037c9
commit 4c77903129
7 changed files with 47 additions and 38 deletions

View File

@@ -110,7 +110,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$sql_array['SELECT'] .= ', fa.user_id';
}
$sql = $db->sql_build_query('SELECT', array(
$sql_ary = array(
'SELECT' => $sql_array['SELECT'],
'FROM' => $sql_array['FROM'],
'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
@@ -118,8 +118,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'WHERE' => $sql_where,
'ORDER_BY' => 'f.left_id',
));
);
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$forum_tracking_info = array();