From 3331b72006df53202c03153719dbad883dba6e52 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 2 Mar 2015 17:20:01 -0600 Subject: [PATCH] Revert "filter: Fix filtering by list item properties" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This partially reverts commit bff191b649d7ade0298129353552c5eb6a8cbd2a. The hasSpecialSearch() method can be retired in `develop-next` — NOT in the `develop` branch --- include/class.forms.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/class.forms.php b/include/class.forms.php index 3f2b68db2..e242a44ba 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -594,6 +594,17 @@ class FormField { return null; } + /** + * Indicates if the field provides for searching for something other + * than keywords. For instance, textbox fields can have hits by keyword + * searches alone, but selection fields should provide the option to + * match a specific value or set of values and therefore need to + * participate on any search builder. + */ + function hasSpecialSearch() { + return true; + } + function getConfigurationForm($source=null) { if (!$this->_cform) { $type = static::getFieldType($this->get('type')); @@ -688,6 +699,10 @@ class TextboxField extends FormField { ); } + function hasSpecialSearch() { + return false; + } + function validateEntry($value) { parent::validateEntry($value); $config = $this->getConfiguration(); @@ -758,6 +773,10 @@ class TextareaField extends FormField { ); } + function hasSpecialSearch() { + return false; + } + function display($value) { $config = $this->getConfiguration(); if ($config['html']) @@ -810,6 +829,10 @@ class PhoneField extends FormField { ); } + function hasSpecialSearch() { + return false; + } + function validateEntry($value) { parent::validateEntry($value); $config = $this->getConfiguration(); @@ -1108,6 +1131,9 @@ class ThreadEntryField extends FormField { function isPresentationOnly() { return true; } + function hasSpecialSearch() { + return false; + } function getConfigurationOptions() { global $cfg; @@ -1428,6 +1454,10 @@ class FileUploadField extends FormField { ); } + function hasSpecialSearch() { + return false; + } + /** * Called from the ajax handler for async uploads via web clients. */ -- GitLab