| | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2011, The Roundcube Dev Team | |
| | | | Copyright (C) 2011, Kolab Systems AG | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | | | See the README file for a full license statement. | |
| | | | | |
| | | | PURPOSE: | |
| | | | Provide database supported session management | |
| | |
| | | |
| | | |
| | | /** |
| | | * Cleanup session data before saving |
| | | */ |
| | | public function cleanup() |
| | | { |
| | | // current compose information is stored in $_SESSION['compose'], move it to $_SESSION['compose_data_<ID>'] |
| | | if ($compose_id = $_SESSION['compose']['id']) { |
| | | $_SESSION['compose_data_'.$compose_id] = $_SESSION['compose']; |
| | | $this->remove('compose'); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Register additional garbage collector functions |
| | | * |
| | | * @param mixed Callback function |
| | |
| | | public function reload() |
| | | { |
| | | if ($this->key && $this->memcache) |
| | | $this->mc_read($this->key); |
| | | $data = $this->mc_read($this->key); |
| | | else if ($this->key) |
| | | $this->db_read($this->key); |
| | | $data = $this->db_read($this->key); |
| | | |
| | | if ($data) |
| | | session_decode($data); |
| | | } |
| | | |
| | | |