testing search function

This commit is contained in:
Viktor Pedersen 2021-08-13 11:55:47 +02:00
parent c36ef5d800
commit 5642edb80f

@ -111,10 +111,9 @@ class SearchPage extends Page {
$mustMatchCheck = False;
foreach($mustIncludeArray as $mustIncludeItem) {
print('DEBUG $mustMustIncludeItem: ');
print_r($mustIncludeItem[$i]);
var_dump($mustIncludeItem);
print('<br>');
// print('DEBUG $mustMustIncludeItem: ');
// var_dump($mustIncludeItem);
// print('<br>');
// $matchResult = $item->matches($mustIncludeItem);
$matchResult = in_array($mustIncludeItem, $item);
@ -137,20 +136,20 @@ class SearchPage extends Page {
}
}
// $out = array();
// foreach ($sanitizedDB as $sanitizedItem) {
// if ($sanitizedItem->matches($mustExcludeArray)) {
$out = array();
foreach ($sanitizedDB as $sanitizedItem) {
if ($sanitizedItem->matches($mustExcludeArray)) {
// // === IF TRUE DO NOTHING ===
// === IF TRUE DO NOTHING ===
// } else {
// $result = $sanitizedItem->matches($canIncludeArray);
// if($result) {
// $out[] = array($sanitizedItem, $result);
// }
// }
// }
// return $out;
} else {
// $result = $sanitizedItem->matches($canIncludeArray);
// if($result) {
// $out[] = array($sanitizedItem, $result);
// }
}
}
return $out;
}
private function translate_terms($terms) {