[icinga-checkins] icinga.org: icinga-api/master: * Now all select columns become an AS as keyword (postgresql requirement)

git at icinga.org git at icinga.org
Wed Sep 29 14:15:19 CEST 2010


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

Author: root <root at localhost.localdomain>
Date:   Wed Sep 29 14:13:06 2010 +0200

* Now all select columns become an AS as keyword (postgresql requirement)

---

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

diff --git a/objects/search/IcingaApiSearchIdo.php b/objects/search/IcingaApiSearchIdo.php
index b76d048..2076ad3 100644
--- a/objects/search/IcingaApiSearchIdo.php
+++ b/objects/search/IcingaApiSearchIdo.php
@@ -233,7 +233,8 @@ class IcingaApiSearchIdo
 			if (($processedColumn = $this->getColumn($currentColumn)) !== false) {
 				array_push($this->resultColumnKeys, $currentColumn);
 				array_push($this->resultColumnsNoAliases, $processedColumn);
-				$processedColumn .= ' ' . $currentColumn;
+				
+				$processedColumn .= ' AS ' . $currentColumn;
 				array_push($this->resultColumns, $processedColumn);
 			}
 		}
@@ -297,7 +298,7 @@ class IcingaApiSearchIdo
 					if (!$loopCounter) {
 						if (count($this->resultColumns)) {
 							$variableValues = $this->applySearchType(implode(',', $this->resultColumns));
-							if ($this->ifSettings->statements['fieldsSuffix'] !== false) {
+							if($this->ifSettings->statements['fieldsSuffix'] !== false) {
 								$variableValues .= $this->ifSettings->statements['fieldsSuffix'];
 							}
 						}
@@ -312,6 +313,7 @@ class IcingaApiSearchIdo
 							}
 						}
 					}
+
 					break;
 
 				case 'FILTER':





More information about the icinga-checkins mailing list