From: brettp Date: Thu, 14 Jan 2010 20:30:47 +0000 (+0000) Subject: Allowing no table prefix in search_get_search_where_sql() X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1ae9d04e864d7b3e67a9087ebdd5237d342e39f6;p=lorea%2Felgg.git Allowing no table prefix in search_get_search_where_sql() git-svn-id: http://code.elgg.org/elgg/trunk@3810 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/mod/search/start.php b/mod/search/start.php index 91443f3c7..366ea4466 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -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.