Index: t3lib/class.t3lib_db.php =================================================================== --- t3lib/class.t3lib_db.php (revision 7331) +++ t3lib/class.t3lib_db.php (working copy) @@ -1332,17 +1332,17 @@ } } + /** + * Checks if database is connected + * + * @return boolean + */ + public function isConnected() { + return is_resource($this->link); + } - - - - - - - - /****************************** * * Debugging Index: typo3/sysext/dbal/class.ux_t3lib_db.php =================================================================== --- typo3/sysext/dbal/class.ux_t3lib_db.php (revision 7331) +++ typo3/sysext/dbal/class.ux_t3lib_db.php (working copy) @@ -2432,6 +2432,25 @@ } /** + * Checks if database is connected + * + * @return boolean + */ + public function isConnected() { + $result = false; + switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) { + case 'native': + $result = is_resource($this->link); + break; + case 'adodb': + case 'userdefined': + $result = is_object($this->handlerInstance[$this->lastHandlerKey]) && $this->handlerInstance[$this->lastHandlerKey]->isConnected(); + break; + } + return $result; + } + + /** * Initialize handler (connecting to database) * * @param string Handler key