Commit f0eabc42 authored by Ganesharatnam's avatar Ganesharatnam
Browse files

modified for search

parent 408535b9
......@@ -538,8 +538,9 @@ function _keywordSearch($word, $data) {
if (!empty($word) && !empty($str)) {
if (strlen($str) >= strlen($word)) {
$s_word = "/" . $word . "/i";
//$regEx = '\'(?!((<.*?)|(<a.*?)))(\b' . $word . '\b)(?!(([^<>]*?)>)|([^>]*?</a>))\'si';
if (preg_match($s_word, $str)) {
$regex = '\'(?!((<.*?)|(<a.*?)))(\b' . $word . '\b)(?!(([^<>]*?)>)|([^>]*?</a>))\'si';
//if (preg_match($s_word, $str)) {
if (preg_match($regex, $str)) {
return TRUE;
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment