[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * PGSQL double result fix

git at icinga.org git at icinga.org
Sun Mar 20 11:26:10 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Feb 14 14:05:44 2011 +0100

* PGSQL double result fix

---

 .../Icinga/ApiSimpleDataProviderModel.class.php    |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/app/modules/Web/models/Icinga/ApiSimpleDataProviderModel.class.php b/app/modules/Web/models/Icinga/ApiSimpleDataProviderModel.class.php
index f6ceb52..e0175b6 100755
--- a/app/modules/Web/models/Icinga/ApiSimpleDataProviderModel.class.php
+++ b/app/modules/Web/models/Icinga/ApiSimpleDataProviderModel.class.php
@@ -172,7 +172,18 @@ class Web_Icinga_ApiSimpleDataProviderModel extends IcingaWebBaseModel {
 		$out = array ();
 		foreach ($result as $row) {
 			$tmp = array ();
+			$test = array ();
 			foreach ($row->getRow() as $key=>$val) {
+				
+				$key = strtoupper($key);
+				
+				if (in_array($key, $test)) {
+					continue;
+				}
+				else {
+					$test[] = $key;
+				}
+				
 				if ($this->mode == self::MODE_ARRAY_KEYVAL) {
 					$tmp[] = array (
 						'key' => $this->tm->_($key),





More information about the icinga-checkins mailing list