1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-31 12:01:48 +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

@@ -375,7 +375,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
$sql_anounce_array['SELECT'] = $sql_array['SELECT'] . ', f.forum_name';
// Obtain announcements ... removed sort ordering, sort by time in all cases
$sql = $db->sql_build_query('SELECT', array(
$sql_ary = array(
'SELECT' => $sql_anounce_array['SELECT'],
'FROM' => $sql_array['FROM'],
'LEFT_JOIN' => $sql_anounce_array['LEFT_JOIN'],
@@ -386,7 +386,8 @@ if ($forum_data['forum_type'] == FORUM_POST)
AND t.topic_type = ' . POST_GLOBAL . ')',
'ORDER_BY' => 't.topic_time DESC',
));
);
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))