* http://davidaltherr.net/web/php_functions/boolean/funcs.mysql.boolean.txt\r
*\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @copyright Copyright (C) 2002-2012 The Nucleus Group\r
* @version $Id: SEARCH.php 1556 2011-07-11 14:18:48Z ftruscot $\r
*/\r
\r
\r
\r
-class SEARCH {\r
-\r
+class Search\r
+{\r
var $querystring;\r
var $marked;\r
var $inclusive;\r
function boolean_sql_select($match){\r
if (i18n::strlen($this->inclusive) > 0) {\r
/* build sql for determining score for each record */\r
- $result=i18n::explode(" ",$this->inclusive);\r
+ $result=preg_split("# #",$this->inclusive);\r
for($cth=0;$cth<count($result);$cth++){\r
if(i18n::strlen($result[$cth])>=4){\r
$stringsum_long .= " $result[$cth] ";\r
\r
/* apply arbitrary function to all 'word' atoms */\r
\r
- $result_a = i18n::explode(' ', $result);\r
+ $result_a = preg_split('# #', $result);\r
\r
for($word = 0;$word<count($result_a);$word++)\r
{\r
}\r
\r
function boolean_sql_where_short($string,$match){\r
- $match_a = i18n::explode(',',$match);\r
+ $match_a = preg_split('#,#',$match);\r
for($ith=0;$ith<count($match_a);$ith++){\r
$like_a[$ith] = " $match_a[$ith] LIKE '% $string %' ";\r
}\r
return $like;\r
}\r
function boolean_sql_select_short($string,$match){\r
- $match_a = i18n::explode(',',$match);\r
+ $match_a = preg_split('#,#',$match);\r
$score_unit_weight = .2;\r
for($ith=0;$ith<count($match_a);$ith++){\r
$score_a[$ith] =\r