From 8654206c72eadd637bfbf079022d0a450db558b9 Mon Sep 17 00:00:00 2001
From: Erik Thuning <boooink@gmail.com>
Date: Tue, 16 Jul 2019 14:45:58 +0200
Subject: [PATCH] Added the ability to search for presence of fields

---
 include/functions.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/functions.php b/include/functions.php
index f82ba69..cf979db 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -219,6 +219,10 @@ function suggest($type) {
 }
 
 function match($testvalues, $matchvalues) {
+    # match only presence of field (if no value given)
+    if(!$testvalues && $matchvalues) {
+        return true;
+    }
     if(!is_array($testvalues)) {
         $testvalues = array($testvalues);
     }