OSDN Git Service

MERGE: リビジョン1737のマージ。i18n::explode()をpreg_splitに置き換え
[nucleus-jp/nucleus-next.git] / nucleus / libs / SEARCH.php
index 450cb4d..146b5e4 100644 (file)
@@ -50,7 +50,7 @@ class Search
        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
@@ -174,7 +174,7 @@ class Search
 \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
@@ -195,7 +195,7 @@ class Search
        }\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
@@ -204,7 +204,7 @@ class Search
                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