Page 1 of 1

Quicksearch plugin doesn't find with pdo-sqlite

Posted: Fri Mar 18, 2011 4:54 pm
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.

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

Posted: Mon Mar 21, 2011 10:40 am
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