testing search function
This commit is contained in:
parent
4b6af75547
commit
a3b720eaba
@ -110,23 +110,44 @@ class SearchPage extends Page {
|
||||
print('DEBUG $canIncludeArray: ');
|
||||
var_dump($canIncludeArray);
|
||||
print('<br>');
|
||||
print('<br>');
|
||||
|
||||
$items = get_items($type);
|
||||
$out = array();
|
||||
foreach($items as $item) {
|
||||
|
||||
$mustMatchCheck = array();
|
||||
// $mustIncludeCheck = array();
|
||||
// foreach($mustIncludeArray as $mustIncludeTerm) {
|
||||
// if ($item->matches($mustIncludeTerm)) {
|
||||
// $mustIncludeCheck[] = False
|
||||
// } else {
|
||||
// $mustIncludeCheck[] = True
|
||||
// }
|
||||
// }
|
||||
|
||||
$mustExcludeCheck = array();
|
||||
foreach($mustExcludeArray as $mustExcludeTerm) {
|
||||
if ($item->matches($mustExcludeTerm)) {
|
||||
$mustExcludeCheck[] = False
|
||||
print('Added FALSE to $mustExcludeCheck[]<br>');
|
||||
} else {
|
||||
$mustExcludeCheck[] = True
|
||||
print('Added TRUE to $mustExcludeCheck[]<br>');
|
||||
}
|
||||
print('DEBUG $mustExcludeCheck: ');
|
||||
var_dump($mustExcludeCheck);
|
||||
print('<br>');
|
||||
print('<br>');
|
||||
}
|
||||
if ($mustExcludeCheck) {
|
||||
|
||||
// === IF TRUE DO NOTHING ===
|
||||
|
||||
} else {
|
||||
foreach ($canIncludeArray as $canIncludeTerm) {
|
||||
$result = $item->matches($canIncludeTerm);
|
||||
if($result) {
|
||||
$out[] = array($item, $result);
|
||||
}
|
||||
} else {
|
||||
foreach ($canIncludeArray as $canIncludeTerm) {
|
||||
$result = $item->matches($canIncludeTerm);
|
||||
if($result) {
|
||||
$out[] = array($item, $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user