testing search function

This commit is contained in:
Viktor Pedersen 2021-09-06 10:28:40 +02:00
parent dad9200ffc
commit 4b6af75547

@ -113,21 +113,24 @@ class SearchPage extends Page {
$items = get_items($type);
$out = array();
// foreach($items as $item) {
foreach($items as $item) {
// $mustMatchCheck = array();
$mustMatchCheck = array();
foreach($mustExcludeArray as $mustExcludeTerm) {
if ($item->matches($mustExcludeTerm)) {
// if ($item->matches($mustExcludeArray)) {
// === IF TRUE DO NOTHING ===
// // === IF TRUE DO NOTHING ===
// } else {
// $result = $item->matches($canIncludeArray);
// if($result) {
// $out[] = array($item, $result);
// }
// }
// }
} else {
foreach ($canIncludeArray as $canIncludeTerm) {
$result = $item->matches($canIncludeTerm);
if($result) {
$out[] = array($item, $result);
}
}
}
}
}
return $out;
}