[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: correct retained config_type selection in doctrine legacy layer, add description how to be used

git at icinga.org git at icinga.org
Fri Aug 26 13:04:55 CEST 2011


Module: icinga-web
Branch: jmosshammer/default
Commit: 5aa8ce2393eba6f15fd88d33894122ec8808d160
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=5aa8ce2393eba6f15fd88d33894122ec8808d160

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Aug 26 12:56:21 2011 +0200

correct retained config_type selection in doctrine legacy layer, add description how to be used

---

 .../LegacyLayer/TargetModifierModel.class.php      |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
index 0215227..0eb621e 100644
--- a/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
+++ b/app/modules/Api/models/Store/LegacyLayer/TargetModifierModel.class.php
@@ -898,8 +898,14 @@ class Api_Store_LegacyLayer_TargetModifierModel extends IcingaStoreTargetModifie
         $db = $this->getContext()->getDatabaseManager()->getDatabase('icinga');
         if(method_exists($db,"useRetained")) {
             if($this->retainedAlias) {
-                $o->andWhere($this->retainedAlias.".config_type= ?",$db->useRetained() ? "0" : "1");
-                                       
+		/*
+		 * the core with idomod dumps 2 different config types
+		 * idomod.cfg:config_output_options
+		 * 1 = original config => config_type = 0
+		 * 2 = retained config => config_type = 1
+		 * 3 = both, both config_types are available
+		 */
+                $o->andWhere($this->retainedAlias.".config_type= ?",$db->useRetained() ? "1" : "0");
             }
         }
         foreach($this->forceGroup as $group) {





More information about the icinga-checkins mailing list