Fixed PostgreSQL incompatibility in new search API
authorDan
Sat, 29 Nov 2008 00:38:35 -0500
changeset 757 7ba7b85e1195
parent 756 e8cf18383425
child 758 6b79a49f85f0
Fixed PostgreSQL incompatibility in new search API
includes/search.php
--- a/includes/search.php	Sat Nov 29 00:20:57 2008 -0500
+++ b/includes/search.php	Sat Nov 29 00:38:35 2008 -0500
@@ -954,9 +954,9 @@
     $where_any =& $where['any'];
     $where_req =& $where['req'];
     $where_not =& $where['not'];
-    $title_col = ( $case_sensitive ) ? $options['titlecolumn'] : 'lcase(' . $options['titlecolumn'] . ')';
+    $title_col = ( $case_sensitive ) ? $options['titlecolumn'] : ENANO_SQLFUNC_LOWERCASE . '(' . $options['titlecolumn'] . ')';
     if ( isset($options['datacolumn']) )
-      $desc_col = ( $case_sensitive ) ? $options['datacolumn'] : 'lcase(' . $options['datacolumn'] . ')';
+      $desc_col = ( $case_sensitive ) ? $options['datacolumn'] : ENANO_SQLFUNC_LOWERCASE . '(' . $options['datacolumn'] . ')';
     else
       $desc_col = "''";
     foreach ( $terms['any'] as $term )