From 21c9e960df95a1cf87226ae2f1f220e14751dc1d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 27 Jun 2008 09:44:48 +0000 Subject: [PATCH] not the problem is fixed AND setup is still working :-) --- phpgwapi/inc/class.egw_db.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index d0d6bfce18..b2b3fffb8c 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -365,7 +365,7 @@ class egw_db if ($this->Port) $Host .= ':'.$this->Port; break; } - if (!is_object($GLOBALS['egw']->ADOdb) || // we have no connection so far + if (!isset($GLOBALS['egw']->ADOdb) || // we have no connection so far (is_object($GLOBALS['egw']->db) && // we connect to a different db, then the global one ($this->Type != $GLOBALS['egw']->db->Type || $this->Database != $GLOBALS['egw']->db->Database || @@ -379,9 +379,9 @@ class egw_db $this->halt("Necessary php database support for $this->Type (".PHP_SHLIB_PREFIX.$php_extension.'.'.PHP_SHLIB_SUFFIX.") not loaded and can't be loaded, exiting !!!"); return null; // in case error-reporting = 'no' } - if (!is_object($GLOBALS['egw']->ADOdb)) // use the global object to store the connection + if (!isset($GLOBALS['egw']->ADOdb)) // use the global object to store the connection { - $this->Link_ID = $GLOBALS['egw']->ADOdb; + $this->Link_ID =& $GLOBALS['egw']->ADOdb; } else { @@ -429,7 +429,7 @@ class egw_db } else { - $this->Link_ID = $GLOBALS['egw']->ADOdb; + $this->Link_ID =& $GLOBALS['egw']->ADOdb; } } // next ADOdb version: if (!$this->Link_ID->isConnected()) $this->Link_ID->Connect();