| Date: | 2009-04-25 11:17:59 (10 months 21 days ago) |
|---|---|
| Author: | Loïc d'Anterroches |
| Commit: | 7809b1ae1138252f1cad5c0d9a3b8a9705a6ad6d |
| Message: | Fixed to correctly cache the DB connection at the model level. |
| Files: |
src/Pluf/Model.php (2 diffs) |
Change Details
| src/Pluf/Model.php | ||
|---|---|---|
| 278 | 278 | */ |
| 279 | 279 | function _getConnection() |
| 280 | 280 | { |
| 281 | if ($this->_con !== null) { | |
| 282 | return $this->_con; | |
| 283 | } | |
| 281 | 284 | $this->_con = &Pluf::db($this); |
| 285 | return $this->_con; | |
| 282 | 286 | } |
| 283 | 287 | |
| 284 | 288 | /** |
| ... | ... | |
| 286 | 290 | */ |
| 287 | 291 | function getDbConnection() |
| 288 | 292 | { |
| 289 | return Pluf::db($this); | |
| 293 | return $this->_getConnection(); | |
| 290 | 294 | } |
| 291 | 295 | |
| 292 | 296 | /** |
