testing search function
This commit is contained in:
parent
fa765dde5e
commit
b8ba31fc70
@ -68,7 +68,6 @@ class SearchPage extends Page {
|
||||
|
||||
foreach($terms as $key => $term) {
|
||||
foreach($term as $value => $parsedTerm) {
|
||||
|
||||
switch ($parsedTerm[0]) {
|
||||
case "+":
|
||||
if (!array_key_exists($key, $mustMatchArray)) {
|
||||
@ -102,9 +101,9 @@ class SearchPage extends Page {
|
||||
$items = get_items($type);
|
||||
$sanitizedItems = array();
|
||||
foreach($items as $item) {
|
||||
$mustMatch = $item->matches($mustMatchArray, True);
|
||||
if($mustMatch) {
|
||||
$sanitizedItems[] = array($item, $mustMatch);
|
||||
$result = $item->matches($mustMatchArray);
|
||||
if($result) {
|
||||
$sanitizedItems[] = array($item, $result);
|
||||
}
|
||||
|
||||
// $mustMatchCheck = array();
|
||||
@ -152,10 +151,22 @@ class SearchPage extends Page {
|
||||
print('DEBUG $sanitizedItem: ');
|
||||
var_dump($sanitizedItem);
|
||||
print('<br><br>');
|
||||
}
|
||||
|
||||
$out = array();
|
||||
return $out;
|
||||
// if($sanitizedItem->matches($cannotMatchArray)) {
|
||||
|
||||
// // === IF TRUE DO NOTHING ===
|
||||
|
||||
// }
|
||||
// else {
|
||||
// $result = $sanitizedItem->matches($mayMatchArray);
|
||||
// if($result) {
|
||||
// $out[] = array($sanitizedItem, $result);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return array();
|
||||
// return $out;
|
||||
}
|
||||
|
||||
private function translate_terms($terms) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user