search function testing
This commit is contained in:
parent
40379061df
commit
dc3cd3251b
@ -103,27 +103,18 @@ class SearchPage extends Page {
|
|||||||
$sanitizedItems = array();
|
$sanitizedItems = array();
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
$mustMatch = $item->matches($mustMatchArray);
|
$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);
|
$sanitizedItems[] = array($item, $mustMatch);
|
||||||
}
|
}
|
||||||
/* ============
|
|
||||||
|
|
||||||
if () {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else if () {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// $mustIncludeCheck = array();
|
// $mustIncludeCheck = array();
|
||||||
// foreach($mustIncludeArray as $mustIncludeTerm) {
|
// foreach($mustIncludeArray as $mustIncludeTerm) {
|
||||||
// if ($item->matches($mustIncludeTerm)) {
|
// if ($item->matches($mustIncludeTerm)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user