[icinga-checkins] icinga.org: icingaweb2/feature/livestatus-playground-4787: Db\DbQuery: add "deep" clone support

git at icinga.org git at icinga.org
Sun Nov 16 17:17:21 CET 2014


Module: icingaweb2
Branch: feature/livestatus-playground-4787
Commit: 90f1ab06b485f645560cca85d40c8e0f87c8450f
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=90f1ab06b485f645560cca85d40c8e0f87c8450f

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Nov 16 17:06:26 2014 +0100

Db\DbQuery: add "deep" clone support

Still far from being complete, Zend_Db_Select makes life really hard for
us. More to come...

---

 library/Icinga/Data/Db/DbQuery.php |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/library/Icinga/Data/Db/DbQuery.php b/library/Icinga/Data/Db/DbQuery.php
index 5062c8c..d7cca4d 100644
--- a/library/Icinga/Data/Db/DbQuery.php
+++ b/library/Icinga/Data/Db/DbQuery.php
@@ -313,6 +313,13 @@ class DbQuery extends SimpleQuery
         . "\n\n";
     }
 
+    public function __clone()
+    {
+        if ($this->select) {
+            $this->select = clone $this->select;
+        }
+    }
+
     /**
      * @return string
      */



More information about the icinga-checkins mailing list