testing search engine changes
This commit is contained in:
parent
b82c2f2b0a
commit
2b12968e43
@ -186,31 +186,13 @@ class SearchPage extends Page {
|
||||
}
|
||||
|
||||
foreach($items as $item) {
|
||||
|
||||
/* version 1
|
||||
if(($item->matches($mustExcludeArray) == False)) {
|
||||
if(($item->matches($canIncludeArray)) || (count($canIncludeArray == 0))){
|
||||
if(count($mustIncludeArray) > 0) {
|
||||
foreach($mustIncludeArray as $mustIncludeArgument) {
|
||||
if($item->matches($mustIncludeArgument)) {
|
||||
$result = True;
|
||||
} else {
|
||||
$result = False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result = True;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
// version 2
|
||||
$mustExcludeCheck = True;
|
||||
$resultExclude = $item->matches($mustExcludeArray)
|
||||
if($resultExclude) {
|
||||
|
||||
} else {
|
||||
$mustIncludeCheck = False;
|
||||
$mustExcludeCheck = False;
|
||||
}
|
||||
$mustIncludeCheck = False;
|
||||
if(count($mustIncludeArray) > 0) {
|
||||
foreach($mustIncludeArray as $mustIncludeArgument) {
|
||||
$resultInclude = $item->matches($mustIncludeArgument)
|
||||
if($resultInclude) {
|
||||
@ -220,6 +202,8 @@ class SearchPage extends Page {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($mustExcludeCheck) {
|
||||
if ($mustIncludeCheck) {
|
||||
if(count($canIncludeArray) > 0) {
|
||||
$canIncludeResult = $item->matches($canIncludeArray)
|
||||
@ -230,11 +214,6 @@ class SearchPage extends Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* if($result) {
|
||||
$out[] = array($item, $result);
|
||||
} */
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user