aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorPayBas <contact@paybas.com>2014-04-07 23:06:09 +0200
committerPayBas <contact@paybas.com>2014-05-02 14:10:03 +0200
commitfadbd2345676fa519a4995a203682fb1f3375011 (patch)
tree467ce218d852e28dd6e07d6e73b5c506b3ed2a2a /phpBB/search.php
parent03e081df26daed6c5e93594a80eec31fe1debb91 (diff)
downloadforums-fadbd2345676fa519a4995a203682fb1f3375011.tar
forums-fadbd2345676fa519a4995a203682fb1f3375011.tar.gz
forums-fadbd2345676fa519a4995a203682fb1f3375011.tar.bz2
forums-fadbd2345676fa519a4995a203682fb1f3375011.tar.xz
forums-fadbd2345676fa519a4995a203682fb1f3375011.zip
[ticket/12366] Include ORDER BY into the query builder
PHPBB3-12366
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 3314328b62..0469f07840 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -655,6 +655,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
),
),
'WHERE' => $sql_where,
+ 'ORDER_BY' => $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'),
);
/**
@@ -716,8 +717,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$sql = "SELECT $sql_select
FROM $sql_from
WHERE $sql_where";
+ $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
}
- $sql .= ' ORDER BY ' . $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$result = $db->sql_query($sql);
$result_topic_id = 0;