diff options
Diffstat (limited to 'core/Session')
-rw-r--r-- | core/Session/SaveHandler/DbTable.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/Session/SaveHandler/DbTable.php b/core/Session/SaveHandler/DbTable.php index 8521215c9b..20494fe98e 100644 --- a/core/Session/SaveHandler/DbTable.php +++ b/core/Session/SaveHandler/DbTable.php @@ -9,6 +9,7 @@ namespace Piwik\Session\SaveHandler; +use Piwik\Db; use Zend_Session; use Zend_Session_SaveHandler_Interface; @@ -49,7 +50,7 @@ class DbTable implements Zend_Session_SaveHandler_Interface */ public function open($save_path, $name) { - $this->config['db']->getConnection(); + Db::get()->getConnection(); return true; } @@ -76,7 +77,7 @@ class DbTable implements Zend_Session_SaveHandler_Interface . ' WHERE ' . $this->config['primary'] . ' = ?' . ' AND ' . $this->config['modifiedColumn'] . ' + ' . $this->config['lifetimeColumn'] . ' >= ?'; - $result = $this->config['db']->fetchOne($sql, array($id, time())); + $result = Db::get()->fetchOne($sql, array($id, time())); if (!$result) $result = ''; @@ -103,7 +104,7 @@ class DbTable implements Zend_Session_SaveHandler_Interface . $this->config['lifetimeColumn'] . ' = ?,' . $this->config['dataColumn'] . ' = ?'; - $this->config['db']->query($sql, array($id, time(), $this->maxLifetime, $data, time(), $this->maxLifetime, $data)); + Db::get()->query($sql, array($id, time(), $this->maxLifetime, $data, time(), $this->maxLifetime, $data)); return true; } @@ -120,7 +121,7 @@ class DbTable implements Zend_Session_SaveHandler_Interface $sql = 'DELETE FROM ' . $this->config['name'] . ' WHERE ' . $this->config['primary'] . ' = ?'; - $this->config['db']->query($sql, array($id)); + Db::get()->query($sql, array($id)); return true; } @@ -137,7 +138,7 @@ class DbTable implements Zend_Session_SaveHandler_Interface $sql = 'DELETE FROM ' . $this->config['name'] . ' WHERE ' . $this->config['modifiedColumn'] . ' + ' . $this->config['lifetimeColumn'] . ' < ?'; - $this->config['db']->query($sql, array(time())); + Db::get()->query($sql, array(time())); return true; } |