[icinga-checkins] icinga.org: icinga-api/mhein/default: * Count queries are not allowed to be grouped

git at icinga.org git at icinga.org
Thu Jan 13 11:25:34 CET 2011


Module: icinga-api
Branch: mhein/default
Commit: f7ab2088df1bbca2297528dcecbc01026733643a
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=f7ab2088df1bbca2297528dcecbc01026733643a

Author: jmosshammer <jannis.mosshammer at netways.com>
Date:   Mon Oct 18 10:01:23 2010 +0200

* Count queries are not allowed to be grouped

---

 objects/search/IcingaApiSearchIdo.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/objects/search/IcingaApiSearchIdo.php b/objects/search/IcingaApiSearchIdo.php
index c7aeb16..3967a98 100644
--- a/objects/search/IcingaApiSearchIdo.php
+++ b/objects/search/IcingaApiSearchIdo.php
@@ -321,7 +321,8 @@ class IcingaApiSearchIdo
 					break;
 
 				case 'GROUPBY':
-							
+					if($this->searchType == IcingaApi::SEARCH_TYPE_COUNT)
+						break;
 					if (!$loopCounter) {
 						list($variableValuesTemplate, $variableValues) =
 							$this->ifSettings->createQueryGroup($this->searchGroup, $this->resultColumnsNoAliases);
@@ -449,7 +450,7 @@ class IcingaApiSearchIdo
 	public function searchValid() {
 		if($this->searchType == IcingaApi::SEARCH_TYPE_COUNT) {
 			$order = $this->searchOrderColumns;
-			$groupby = $this->searchGroup;
+			$this->searchGroup = array();
 
 			if(!empty($order) && empty($groupby)) {
 				$this->searchOrder = array();





More information about the icinga-checkins mailing list