]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Allowing no table prefix in search_get_search_where_sql()
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 14 Jan 2010 20:30:47 +0000 (20:30 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 14 Jan 2010 20:30:47 +0000 (20:30 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3810 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/search/start.php

index 91443f3c71b94a5a967add1f6944f071d70d79e4..366ea44662082d9c7e2b9b2d531054e8e11abb09 100644 (file)
@@ -378,7 +378,9 @@ function search_get_where_sql($table, $fields, $params, $use_fulltext = TRUE) {
 
        // add the table prefix to the fields
        foreach ($fields as $i => $field) {
-               $fields[$i] = "$table.$field";
+               if ($table) {
+                       $fields[$i] = "$table.$field";
+               }
        }
 
        // if we're not using full text, rewrite the query for bool mode.