[icinga-checkins] icinga.org: icinga-web/next: Fix disableAutoIdentifierFields of IcingaDoctrine_Query (refs #3829)

git at icinga.org git at icinga.org
Mon Mar 11 16:25:05 CET 2013


Module: icinga-web
Branch: next
Commit: 08385c6d72ee91f49524c051bced775bd549e7de
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=08385c6d72ee91f49524c051bced775bd549e7de

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Mon Mar 11 16:19:17 2013 +0100

Fix disableAutoIdentifierFields of IcingaDoctrine_Query (refs #3829)

or disableAutoIdentifiedFields

Which wouldn't have worked since 2011, but wasn't used until
the newest credential changes (for summary aggregation).

---

 .../lib/database/IcingaDoctrine_Query.class.php    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/modules/Api/lib/database/IcingaDoctrine_Query.class.php b/app/modules/Api/lib/database/IcingaDoctrine_Query.class.php
index 1ef8260..1af49f6 100644
--- a/app/modules/Api/lib/database/IcingaDoctrine_Query.class.php
+++ b/app/modules/Api/lib/database/IcingaDoctrine_Query.class.php
@@ -165,7 +165,7 @@ class IcingaDoctrine_Query extends Doctrine_Query {
             // only auto-add the primary key fields if this query object is not
             // a subquery of another query object or we're using a child of the Object Graph
             // hydrator
-            if (! $this->_isSubquery && is_subclass_of($driverClassName, 'Doctrine_Hydrator_Graph') && $this->_disableAutoIdentifiedFields == false) {
+            if ( (!$this->_isSubquery) && (!is_subclass_of($driverClassName, 'Doctrine_Hydrator_Graph')) && $this->_disableAutoIdentifiedFields == false ) {
                 $fields = array_unique(array_merge((array) $table->getIdentifier(), $fields));
             }
         }





More information about the icinga-checkins mailing list