testing search function
This commit is contained in:
parent
bb03439acf
commit
a850841dbc
@ -102,20 +102,22 @@ class SearchPage extends Page {
|
||||
$items = get_items($type);
|
||||
$sanitizedItems = array();
|
||||
foreach($items as $item) {
|
||||
$mustMatch = $item->matches($mustMatchArray);
|
||||
// $mustMatch = $item->matches($mustMatchArray);
|
||||
|
||||
if($mustMatch) {
|
||||
$sanitizedItems[] = array($item, $mustMatch);
|
||||
|
||||
$mustMatchCheck = array();
|
||||
foreach($mustMatchArray as $mustMatchTerm) {
|
||||
$mustMatch = $item->matches($mustMatchTerm);
|
||||
if ($mustMatch) {
|
||||
$mustMatchCheck[] = True;
|
||||
} else {
|
||||
$mustMatchCheck[] = False;
|
||||
}
|
||||
}
|
||||
|
||||
// $mustIncludeCheck = array();
|
||||
// foreach($mustIncludeArray as $mustIncludeTerm) {
|
||||
// if ($item->matches($mustIncludeTerm)) {
|
||||
// $mustIncludeCheck[] = True;
|
||||
// } else {
|
||||
// $mustIncludeCheck[] = False;
|
||||
// }
|
||||
// }
|
||||
if(in_array(False, $mustMatchCheck, True) === False) {
|
||||
$sanitizedItems[] = array($item, $mustMatch);
|
||||
}
|
||||
|
||||
// $mustExcludeCheck = array();
|
||||
// foreach($mustExcludeArray as $mustExcludeTerm) {
|
||||
@ -144,7 +146,7 @@ class SearchPage extends Page {
|
||||
|
||||
foreach($sanitizedItems as $sanitizedItem) {
|
||||
print('DEBUG $sanitizedItem: ');
|
||||
var_dump($sanitizedItem);
|
||||
var_dump($sanitizedItem;
|
||||
print('<br><br>');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user