[icinga-checkins] icinga.org: icinga-web/next: Match for a lowercase filter in the view ( refs #3844 refs #3268)

git at icinga.org git at icinga.org
Tue Mar 26 14:21:15 CET 2013


Module: icinga-web
Branch: next
Commit: 7b95518818a5248af96e6ca370bc115da8828234
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=7b95518818a5248af96e6ca370bc115da8828234

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Mar 26 14:19:53 2013 +0100

Match for a lowercase filter in the view (refs #3844 refs #3268)

---

 .../Api/models/Views/ApiDQLViewModel.class.php     |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/modules/Api/models/Views/ApiDQLViewModel.class.php b/app/modules/Api/models/Views/ApiDQLViewModel.class.php
index 63f373e..4500de5 100644
--- a/app/modules/Api/models/Views/ApiDQLViewModel.class.php
+++ b/app/modules/Api/models/Views/ApiDQLViewModel.class.php
@@ -121,9 +121,12 @@ class API_Views_ApiDQLViewModel extends IcingaBaseModel {
         $field = $field_ex[0];
         $fieldName = $field;
         if(!isset($this->view["filter"][$field])) {
-            if(!isset($this->view["filter"][$field."{ID}"]))
+            // look for lowercase filter of the field
+            if(isset($this->view["filter"][strtolower($field)]))
+                $fieldName = strtolower($field);
+            else if(!isset($this->view["filter"][$field."{ID}"]))
                 return $field;
-            $fieldName = $field."{ID}";
+            else $fieldName = $field."{ID}";
         }
         $filterDefinition = $this->view["filter"][$fieldName];
 





More information about the icinga-checkins mailing list