summaryrefslogtreecommitdiff
path: root/program/include/rcube_session.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-02-21 21:43:39 +0000
committerthomascube <thomas@roundcube.net>2012-02-21 21:43:39 +0000
commitfec2d8e1309d1f16f9cd772b82b28627d9359354 (patch)
tree84a7d8d9276822535c6bfb2fd8429258df3436cf /program/include/rcube_session.php
parent965e6276b3bf20545bcec46f87ef13ffadfac6c3 (diff)
Refactored IMAP cache expunge: delegate to storage object; don't rely on deprecated 'enable_caching' config option
Diffstat (limited to 'program/include/rcube_session.php')
-rw-r--r--program/include/rcube_session.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index 1f5290c71..5ec9f337f 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -332,10 +332,15 @@ class rcube_session
*
* @param mixed Callback function
*/
- public function register_gc_handler($func_name)
+ public function register_gc_handler($func)
{
- if ($func_name && !in_array($func_name, $this->gc_handlers))
- $this->gc_handlers[] = $func_name;
+ foreach ($this->gc_handlers as $handler) {
+ if ($handler == $func) {
+ return;
+ }
+ }
+
+ $this->gc_handlers[] = $func;
}