Changeset 614 for trunk/includes/global.php
- Timestamp:
- Nov 28, 2013, 6:24:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r603 r614 550 550 if ($mode == 2) $where .= ' AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Language` <> '.$Config['OriginalLanguage'].') AND (`Sub`.`Entry` = `O`.`Entry`))'; 551 551 $where .= ' AND ('; 552 if (array_search('the' , $ArrStr)) $where .= '(`O`.`'.$Column.'` LIKE "The %") OR '; 552 553 553 554 $SqlOK = false; … … 555 556 for($i = 0; $i < count($ArrStr); $i++) 556 557 { 557 // if (strpos($ArrStr[$i],"'s") > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-2); 558 // if (strpos($ArrStr[$i],',') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 559 // if (strpos($ArrStr[$i],'.') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 560 // if (strpos($ArrStr[$i],'!') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 561 // if (strpos($ArrStr[$i],'?') > 0) $ArrStr[$i] = substr($ArrStr[$i],0,strlen($ArrStr[$i])-1); 562 563 if (strlen($ArrStr[$i]) > 4) { 564 $where .= '(`O`.`'.$Column.'` LIKE "%'.addslashes($ArrStr[$i]).'%") OR '; 558 559 //find word only if is 3 characters and more, and if starts by upper char, and search only once 560 if ((strlen($ArrStr[$i]) > 3) and (ctype_upper(substr($ArrStr[$i],0,1))) and (array_search($ArrStr[$i], $ArrStr) == $i)) { 561 $where .= '(`O`.`'.$Column.'` LIKE "'.addslashes($ArrStr[$i]).'%") OR '; 565 562 $SqlOK = true; 566 563 }
Note:
See TracChangeset
for help on using the changeset viewer.