testing search function
This commit is contained in:
parent
141a3017c5
commit
4e6ad4f94e
@ -102,25 +102,25 @@ class SearchPage extends Page {
|
|||||||
$items = get_items($type);
|
$items = get_items($type);
|
||||||
$sanitizedItems = array();
|
$sanitizedItems = array();
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
$mustMatch = $item->matches($mustMatchArray);
|
// $mustMatch = $item->matches($mustMatchArray);
|
||||||
if($mustMatch) {
|
// if($mustMatch) {
|
||||||
$sanitizedItems[] = array($item, $mustMatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
// $mustMatchCheck = array();
|
|
||||||
// foreach($mustMatchArray as $mustMatchTerm) {
|
|
||||||
|
|
||||||
// $matchingResult = $item->matches($mustMatchTerm);
|
|
||||||
// if ($matchingResult) {
|
|
||||||
// $mustMatchCheck[] = True;
|
|
||||||
// } else {
|
|
||||||
// $mustMatchCheck[] = False;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(in_array(False, $mustMatchCheck, True) === False) {
|
|
||||||
// $sanitizedItems[] = array($item, $mustMatch);
|
// $sanitizedItems[] = array($item, $mustMatch);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
$mustMatchCheck = array();
|
||||||
|
foreach($mustMatchArray as $mustMatchTerm) {
|
||||||
|
|
||||||
|
$matchingResult = $item->matches($mustMatchTerm);
|
||||||
|
if ($matchingResult) {
|
||||||
|
$mustMatchCheck[] = True;
|
||||||
|
} else {
|
||||||
|
$mustMatchCheck[] = False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(in_array(False, $mustMatchCheck, True) === False) {
|
||||||
|
$sanitizedItems[] = array($item, $mustMatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $mustExcludeCheck = array();
|
// $mustExcludeCheck = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user