search function testing

This commit is contained in:
Viktor Pedersen 2021-09-06 17:00:03 +02:00
parent 40379061df
commit dc3cd3251b

@ -103,27 +103,18 @@ class SearchPage extends Page {
$sanitizedItems = array();
foreach($items as $item) {
$mustMatch = $item->matches($mustMatchArray);
if($mustMatch) {
$mustMatchCheck = array();
foreach($mustIncludeArray as $mustIncludeTerm) {
if (array_key_exists($mustIncludeTerm, $mustMatchCheck)) {
$mustMatchCheck[] = True;
} else {
$mustMatchCheck[] = False;
}
}
if(in_array(False, $mustIncludeCheck, True) === False) {
$sanitizedItems[] = array($item, $mustMatch);
}
/* ============
if () {
}
else if () {
}
else
*/
// $mustIncludeCheck = array();
// foreach($mustIncludeArray as $mustIncludeTerm) {
// if ($item->matches($mustIncludeTerm)) {