Changeset 6bb44a6 in github
- Timestamp:
- Jun 20, 2012 12:39:54 PM (11 months ago)
- Branches:
- master, HEAD
- Children:
- 7dc7eb1
- Parents:
- 1fe450b
- Location:
- program/include
- Files:
-
- 2 edited
-
rcube.php (modified) (2 diffs)
-
rcube_imap.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube.php
r041c93c r6bb44a6 107 107 * This implements the 'singleton' design pattern 108 108 * 109 * @param integer Options to initialize with this instance. See rcube::INIT_WITH_* constants 109 110 * @return rcube The one and only instance 110 111 */ 111 static function get_instance( )112 static function get_instance($mode = 0) 112 113 { 113 114 if (!self::$instance) { 114 115 self::$instance = new rcube(); 116 self::$instance->init($mode); 115 117 } 116 118 … … 241 243 public function get_cache($name, $type='db', $ttl=0, $packed=true) 242 244 { 243 if (!isset($this->caches[$name])) { 244 $userid = $this->get_user_id(); 245 if (!isset($this->caches[$name]) && ($userid = $this->get_user_id())) { 245 246 $this->caches[$name] = new rcube_cache($type, $userid, $name, $ttl, $packed); 246 247 } -
program/include/rcube_imap.php
rbdb40d3 r6bb44a6 3743 3743 if ($this->messages_caching && !$this->mcache) { 3744 3744 $rcube = rcube::get_instance(); 3745 if ( $dbh = $rcube->get_dbh()) {3745 if (($dbh = $rcube->get_dbh()) && ($userid = $rcube->get_user_id())) { 3746 3746 $this->mcache = new rcube_imap_cache( 3747 $dbh, $this, $ rcube->get_user_id(), $this->options['skip_deleted']);3747 $dbh, $this, $userid, $this->options['skip_deleted']); 3748 3748 } 3749 3749 }
Note: See TracChangeset
for help on using the changeset viewer.
