From 68f39efb0476ba2d3cfe68ec49b5d6c1afcfdab0 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 26 Apr 2011 03:30:45 -0400
Subject: [PATCH] - Fix fatal error from last commit (#1487884), rename rcube_gc() to gc()

---
 program/include/rcube_session.php |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index 97dfe3c..3f1e1cc 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -166,12 +166,12 @@
     if ($key == $this->key && $ts - $this->start < 0.5) {
       $oldvars = $this->vars;
     } else { // else read data again from DB
-      $oldvars = $this->read($key);
+      $oldvars = $this->db_read($key);
     }
 
     if ($oldvars !== false) {
       $newvars = $this->_fixvars($vars, $oldvars);
-      
+
       if ($newvars !== $oldvars) {
         $this->db->query(
           sprintf("UPDATE %s SET vars=?, changed=%s WHERE sess_id=?",
@@ -193,8 +193,8 @@
     $this->unsets = array();
     return true;
   }
-  
-  
+
+
   private function _fixvars($vars, $oldvars)
   {
     $ts = microtime(true);
@@ -211,7 +211,7 @@
       else
         $newvars = $vars;
     }
-    
+
     $this->unsets = array();
     return $newvars;
   }
@@ -246,7 +246,7 @@
       sprintf("DELETE FROM %s WHERE changed < %s",
         get_table_name('session'), $this->db->fromunixtime(time() - $maxlifetime)));
 
-    $this->rcube_gc();
+    $this->gc();
 
     return true;
   }
@@ -315,7 +315,7 @@
   /**
    * Execute registered garbage collector routines
    */
-  public function rcube_gc()
+  public function gc()
   {
     foreach ($this->gc_handlers as $fct)
       $fct();

--
Gitblit v1.9.1