Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16176/include
Modified Files:
functions_entries.inc.php
Log Message:
propriertary sqlite searching
Index: functions_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_entries.inc.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- functions_entries.inc.php 3 Feb 2005 18:55:16 -0000 1.54
+++ functions_entries.inc.php 9 Feb 2005 08:41:03 -0000 1.55
@@ -429,6 +429,13 @@
$group = '';
$distinct = 'DISTINCT';
$find_part = "(title~'$term' OR body~'$term' OR extended~'$term')";
+ } elseif ($serendipity['dbType'] == '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
+ $group = 'GROUP BY e.id';
+ $distinct = '';
+ $term = serendipity_mb('strtolower', $term);
+ $find_part = "(lower(title) LIKE '%$term%' OR lower(body) LIKE '%$term%' OR extended LIKE '%$term%')";
} else {
$group = 'GROUP BY e.id';
$distinct = '';
|