From 13161d3135a52e80f01bf7923d711f2945649348 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 21 Feb 2012 21:43:39 +0000 Subject: Refactored IMAP cache expunge: delegate to storage object; don't rely on deprecated 'enable_caching' config option git-svn-id: https://svn.roundcube.net/trunk@5898 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_session.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'roundcubemail/program/include/rcube_session.php') diff --git a/roundcubemail/program/include/rcube_session.php b/roundcubemail/program/include/rcube_session.php index 1f5290c71..5ec9f337f 100644 --- a/roundcubemail/program/include/rcube_session.php +++ b/roundcubemail/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; } -- cgit v1.2.3