projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62b8744
)
Don't consider the connection active if the connection object is missing/false, and...
author
Chuck Hagenbuch
<chuck@horde.org>
Tue, 25 Jan 2011 14:04:59 +0000
(09:04 -0500)
committer
Chuck Hagenbuch
<chuck@horde.org>
Wed, 26 Jan 2011 18:05:11 +0000
(13:05 -0500)
framework/Db/lib/Horde/Db/Adapter/Base.php
patch
|
blob
|
history
diff --git
a/framework/Db/lib/Horde/Db/Adapter/Base.php
b/framework/Db/lib/Horde/Db/Adapter/Base.php
index
608e894
..
a34247e
100644
(file)
--- a/
framework/Db/lib/Horde/Db/Adapter/Base.php
+++ b/
framework/Db/lib/Horde/Db/Adapter/Base.php
@@
-332,7
+332,7
@@
abstract class Horde_Db_Adapter_Base implements Horde_Db_Adapter
*/
public function isActive()
{
- return $this->_active;
+ return $this->_active
&& $this->_connection
;
}
/**
@@
-517,6
+517,8
@@
abstract class Horde_Db_Adapter_Base implements Horde_Db_Adapter
*/
public function execute($sql, $arg1 = null, $arg2 = null)
{
+ if (!$this->isActive()) { $this->reconnect(); }
+
if (is_array($arg1)) {
$sql = $this->_replaceParameters($sql, $arg1);
$name = $arg2;