From 4cf42fde05ff891f6961ba60dbb1c2e4c91c39c6 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 20 Mar 2012 18:47:24 -0400
Subject: [PATCH] Add support for read-only address book records
---
program/include/rcube_session.php | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index 1f5290c..5ec9f33 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -332,10 +332,15 @@
*
* @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;
}
--
Gitblit v1.9.1