diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-16 16:54:51 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-16 16:54:51 +0000 |
| commit | b0c3e3958220c04cbb4f25f0c24b53b65a34e360 (patch) | |
| tree | 6c23cb4352a297b4dade2b3a1aa6706b89a53c82 /phpBB/includes/search/fulltext_native.php | |
| parent | a3c9182e0f9efeb193f5ef682d1945382f234eb3 (diff) | |
| download | forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.gz forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.bz2 forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.xz forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.zip | |
- removed db cache (might re-appear, but for now we do not see the need for it)
- all changes to styles/subsilver/template are purely cosmetic (no functional changes)
- cosmetics
- bugfixes
- add index to modules table
- use modules ordering code for forums too
git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
| -rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 6bdaaec176..71941f8bfc 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -284,9 +284,11 @@ class fulltext_native extends search_backend $id_ary = array(); $join_topic = ($type == 'posts') ? false : true; + // Build sql strings for sorting $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC'); $sql_sort_table = $sql_sort_join = ''; + switch ($sql_sort[0]) { case 'u': @@ -363,17 +365,21 @@ class fulltext_native extends search_backend { case '-': $bool = 'NOT'; - continue; + continue; + case '+': $bool = 'AND'; - continue; + continue; + case '|': $bool = 'OR'; - continue; + continue; + default: $bool = ($terms != 'all') ? 'OR' : $bool; $sql_words[$bool][] = "'" . $db->sql_escape(preg_replace('#\*+#', '%', trim($word))) . "'"; $bool = ($terms == 'all') ? 'AND' : 'OR'; + break; } } @@ -400,6 +406,7 @@ class fulltext_native extends search_backend if (!($row = $db->sql_fetchrow($result))) { + $db->sql_freeresult($result); $id_ary = array(); return false; } @@ -444,6 +451,7 @@ class fulltext_native extends search_backend if (!($row = $db->sql_fetchrow($result))) { + $db->sql_freeresult($result); $id_ary = array(); return false; } |
