[icinga-checkins] icinga.org: icinga-web/feature/credentials-3715: Removed CanBeNull feature from Legacy credentials

git at icinga.org git at icinga.org
Fri Apr 26 11:57:28 CEST 2013


Module: icinga-web
Branch: feature/credentials-3715
Commit: 4a78f84acc9848284fffd4f310c57fb4b77999c6
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=4a78f84acc9848284fffd4f310c57fb4b77999c6

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Thu Apr 25 15:38:49 2013 +0200

Removed CanBeNull feature from Legacy credentials

Not longer needed with the migration to grouped credentials

refs #3715

---

 .../principal/IcingaDataPrincipalTarget.class.php  |   14 --------------
 .../IcingaDataServicePrincipalTarget.class.php     |    1 -
 2 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/app/modules/Web/lib/principal/IcingaDataPrincipalTarget.class.php b/app/modules/Web/lib/principal/IcingaDataPrincipalTarget.class.php
index 10c26b4..a1edb36 100644
--- a/app/modules/Web/lib/principal/IcingaDataPrincipalTarget.class.php
+++ b/app/modules/Web/lib/principal/IcingaDataPrincipalTarget.class.php
@@ -25,7 +25,6 @@
 class IcingaDataPrincipalTarget extends AppKitPrincipalTarget {
     protected $defaultTarget = '';
     protected $api_mapping_fields = array();
-    protected $can_be_null = false;
 
     public function getApiMappingFields() {
         return $this->api_mapping_fields;
@@ -43,17 +42,6 @@ class IcingaDataPrincipalTarget extends AppKitPrincipalTarget {
         $this->api_mapping_fields = $a;
     }
 
-    /* allows the filter to add an "AND xx IS NULL" to the query
-       @author mfrosch
-    */
-    public function setCanBeNull($bool = true) {
-        $this->can_be_null = (bool) $bool;
-    }
-
-    public function getCanBeNull() {
-        return $this->can_be_null;
-    }
-
     public function getApiMappingField($field) {
         if (array_key_exists($field, $this->api_mapping_fields)) {
             return $this->api_mapping_fields[$field];
@@ -69,8 +57,6 @@ class IcingaDataPrincipalTarget extends AppKitPrincipalTarget {
                 $p[] = sprintf('${%s} LIKE \'%s\'', $this->getApiMappingField($k), $v);
             }
         }
-        if($this->can_be_null == true)
-            $p[] = sprintf('${%s} IS NULL', $this->getApiMappingField($k));
 
         return '('. join(' OR ', $p). ')';
     }
diff --git a/app/modules/Web/lib/principal/IcingaDataServicePrincipalTarget.class.php b/app/modules/Web/lib/principal/IcingaDataServicePrincipalTarget.class.php
index 4522d3f..ba46a77 100644
--- a/app/modules/Web/lib/principal/IcingaDataServicePrincipalTarget.class.php
+++ b/app/modules/Web/lib/principal/IcingaDataServicePrincipalTarget.class.php
@@ -53,7 +53,6 @@ class IcingaDataServicePrincipalTarget extends IcingaDataPrincipalTarget {
                 'value'  => 'SERVICE_NAME'
         ));
 
-        $this->setCanBeNull(true);
     }
     
 }





More information about the icinga-checkins mailing list