From 4e6ad4f94ef783686dbea7fe4f6fbcb207d94380 Mon Sep 17 00:00:00 2001
From: Viktor Pedersen <viktor@dsv.su.se>
Date: Wed, 8 Sep 2021 10:38:02 +0200
Subject: [PATCH] testing search function

---
 include/SearchPage.php | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/SearchPage.php b/include/SearchPage.php
index f7761c9..3e25fc3 100644
--- a/include/SearchPage.php
+++ b/include/SearchPage.php
@@ -102,25 +102,25 @@ class SearchPage extends Page {
         $items = get_items($type);
         $sanitizedItems = array();
         foreach($items as $item) {
-            $mustMatch = $item->matches($mustMatchArray);
-            if($mustMatch) {
-                $sanitizedItems[] = array($item, $mustMatch);
-            }
-
-            // $mustMatchCheck = array();
-            // foreach($mustMatchArray as $mustMatchTerm) {
-
-            //     $matchingResult = $item->matches($mustMatchTerm);
-            //     if ($matchingResult) {
-            //         $mustMatchCheck[] = True;
-            //     } else {
-            //         $mustMatchCheck[] = False;
-            //     }
-            // }
-            // if(in_array(False, $mustMatchCheck, True) === False) {
+            // $mustMatch = $item->matches($mustMatchArray);
+            // if($mustMatch) {
             //     $sanitizedItems[] = array($item, $mustMatch);
             // }
 
+            $mustMatchCheck = array();
+            foreach($mustMatchArray as $mustMatchTerm) {
+
+                $matchingResult = $item->matches($mustMatchTerm);
+                if ($matchingResult) {
+                    $mustMatchCheck[] = True;
+                } else {
+                    $mustMatchCheck[] = False;
+                }
+            }
+            if(in_array(False, $mustMatchCheck, True) === False) {
+                $sanitizedItems[] = array($item, $mustMatch);
+            }
+
             
 
             // $mustExcludeCheck = array();