diff --git a/src/Pluf/Model.php b/src/Pluf/Model.php index 30c5af2..eae0cb8 100644 --- a/src/Pluf/Model.php +++ b/src/Pluf/Model.php @@ -278,7 +278,11 @@ class Pluf_Model */ function _getConnection() { + if ($this->_con !== null) { + return $this->_con; + } $this->_con = &Pluf::db($this); + return $this->_con; } /** @@ -286,7 +290,7 @@ class Pluf_Model */ function getDbConnection() { - return Pluf::db($this); + return $this->_getConnection(); } /**