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