Quicksearch plugin doesn't find with pdo-sqlite

Found a bug? Tell us!!
Post Reply
alexkp
Posts: 1
Joined: Fri Mar 18, 2011 4:45 pm

Quicksearch plugin doesn't find with pdo-sqlite

Post by alexkp »

Hi, I installed s9y 1.5.5 today. I am using the pdo-sqlite driver. To make the quicksearch plugin work I had to make the following change to include/functions_entries.inc.php:

Code: Select all

--- include/functions_entries.inc.php.orig      2011-03-18 15:13:44.890002699 +0000
+++ include/functions_entries.inc.php   2011-03-18 15:13:59.880002716 +0000
@@ -770,7 +770,7 @@
         } else {
             $cond['find_part'] = "(title ILIKE '%$term%' OR body ILIKE '%$term%' OR extended ILIKE '%$term%')";
         }
-    } elseif ($serendipity['dbType'] == 'sqlite' || $serendipity['dbType'] == 'sqlite3') {
+    } elseif ($serendipity['dbType'] == 'sqlite' || $serendipity['dbType'] == 'sqlite3' || $serendipity['dbType'] == 'pdo-sqlite') {
         // Very extensive SQLite search. There currently seems no other way to perform fulltext search in SQLite
         // But it's better than no search at all :-D
         $cond['group']     = 'GROUP BY e.id';
Without this patch, quicksearch always returns no results. With the patch applied, the search appears to work correctly. I am not familiar with the code though, so I don't know whether this will break anything else.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Quicksearch plugin doesn't find with pdo-sqlite

Post by garvinhicking »

Hi!

Thanks for the feedback, and sorry for the hassle. This string is contained in s9y 1.6 beta versions already, so the next update would also include that for you :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply