testing search function

This commit is contained in:
Viktor Pedersen 2021-08-13 10:58:21 +02:00
parent bd8c9c8711
commit df0456959e

@ -103,9 +103,6 @@ class SearchPage extends Page {
// print('<br>');
$items = get_items($type);
// $cannotMatchResults = $item->matches($mustExcludeArray);
// $mustMatchResults = $item->matches($mustIncludeArray);
// $canMatchResults = $item->matches($canIncludeArray);
$sanitizedDB = array();
$out = array();
$mustMatchCheck = False;
@ -114,13 +111,16 @@ class SearchPage extends Page {
foreach ($mustMatchResults as $matchResult) {
if($item->matches($mustIncludeArray)) {
$mustMatchCheck = True;
print('DEBUG $mustMatchCheck: TRUE');
} else {
$mustMatchCheck = False;
print('DEBUG $mustMatchCheck: FALSE');
break;
}
}
if ($mustMatchCheck) {
$sanitizedDB[] = array($item);
print('DEBUG $sanitizedDB: ADDED ITEM');
}
}
foreach ($sanitizedDB as $sanitizedItem) {