aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-02-01 03:13:08 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-02-01 03:13:08 +0000
commit9a685e7a4839058a99ddcb5f9c79c126f5ce318b (patch)
treed7ca4a398200640041c540cc3e71fe8780c0a727 /phpBB/includes/search
parent2db7def46a2172a8611fc232a53b4484f6fbe22d (diff)
downloadforums-9a685e7a4839058a99ddcb5f9c79c126f5ce318b.tar
forums-9a685e7a4839058a99ddcb5f9c79c126f5ce318b.tar.gz
forums-9a685e7a4839058a99ddcb5f9c79c126f5ce318b.tar.bz2
forums-9a685e7a4839058a99ddcb5f9c79c126f5ce318b.tar.xz
forums-9a685e7a4839058a99ddcb5f9c79c126f5ce318b.zip
- should fix some Firebird issues ( can't believe that nobody found this until now )
git-svn-id: file:///svn/phpbb/trunk@6954 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
-rwxr-xr-xphpBB/includes/search/fulltext_native.php38
1 files changed, 35 insertions, 3 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 11ca09805a..bd197feede 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -1266,9 +1266,41 @@ class fulltext_native extends search_backend
{
global $db;
- $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_WORDLIST_TABLE);
- $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_WORDMATCH_TABLE);
- $db->sql_query((($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ') . SEARCH_RESULTS_TABLE);
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE);
+ break;
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE);
+ break;
+ }
+
+ switch ($db->sql_layer)
+ {
+ case 'sqlite':
+ case 'firebird':
+ $db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE);
+ break;
+
+ default:
+ $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+ break;
+ }
}
/**