testing search function
This commit is contained in:
parent
3b4da1e5dd
commit
9f9fd166f6
@ -102,21 +102,22 @@ class SearchPage extends Page {
|
||||
$items = get_items($type);
|
||||
$sanitizedItems = array();
|
||||
foreach($items as $item) {
|
||||
// $mustMatch = $item->matches($mustMatchArray);
|
||||
$mustMatch = $item->matches($mustMatchArray);
|
||||
|
||||
|
||||
$mustMatchCheck = array();
|
||||
foreach($mustMatchArray as $mustMatchTerm) {
|
||||
$matchingResult = $item->matches($mustMatchTerm);
|
||||
if ($matchingResult) {
|
||||
$mustMatchCheck[] = True;
|
||||
} else {
|
||||
$mustMatchCheck[] = False;
|
||||
}
|
||||
}
|
||||
// $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);
|
||||
$sanitizedItems[] = array($item, $mustMatch);
|
||||
}
|
||||
|
||||
// $mustExcludeCheck = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user