testing things

This commit is contained in:
Viktor Pedersen 2021-08-23 14:20:35 +02:00
parent b25b9512ce
commit 24ed30f22b

@ -80,65 +80,29 @@ class SearchPage extends Page {
print_r($terms[$key]);
print('<br>');
print('DEBUG $terms[$term]: ');
print_r($terms[$term]);
print('<br>');
print('DEBUG $terms[0]: ');
print_r($terms[0]);
print('<br>');
print('DEBUG $terms[1]: ');
print_r($terms[1]);
print('<br>');
print('DEBUG $key: ');
print_r($key);
print('<br>');
// print('DEBUG $terms[1]: ');
// print_r($terms[1]);
// print('<br>');
print('<br>');
// foreach($term as $value => $i) {
// print('DEBUG $term[$value]: ');
// print_r($term[$value]);
// print('<br>');
// print('DEBUG $i: ');
// print_r($i);
// print('<br>');
// print('DEBUG $term[$i]: ');
// print_r($term[$i]);
// print('<br>');
// print('DEBUG $term[$value][0]: ');
// print_r($term[$value][0]);
// print('<br>');
// print('DEBUG $i[0]: ');
// print_r($i[0]);
// print('<br>');
// print('<br>');
// // switch ($term[$value][0]) {
// // case "+":
// // $mustIncludeArray[] = array(substr($term[$value], 1));
// // break;
// // case "!":
// // case "-":
// // $mustExcludeArray[] = array(substr($term[$value], 1));
// // break;
// // case "~":
// // $canIncludeArray[] = array(substr($term[$value], 1));
// // break;
// // default:
// // $canIncludeArray[] = array($term[$value]);
// // break;
// // }
// }
foreach($term as $value => $i) {
switch ($i[0]) {
case "+":
$mustIncludeArray[] = array($key, (substr($i, 1)));
break;
case "!":
case "-":
$mustExcludeArray[] = array($key, (substr($i, 1)));
break;
case "~":
$canIncludeArray[] = array($key, (substr($i, 1)));
break;
default:
$canIncludeArray[] = array($key, $i);
break;
}
}
}
print('DEBUG mustIncludeArray: ');