From 929a508d801d9434c8d98dccd0311e3a707303ba Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 1 Mar 2010 19:04:34 +0000 Subject: - Improve performance by avoiding unnecessary updates to the session table (#1486325) --- program/include/main.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'program/include/main.inc') diff --git a/program/include/main.inc b/program/include/main.inc index 207614885..9cf6dd00c 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -1487,12 +1487,20 @@ function rcube_https_check($port=null, $use_https=true) return true; if ($port && $_SERVER['SERVER_PORT'] == $port) return true; - if ($use_https && $RCMAIL->config->get('use_https')) + if ($use_https && isset($RCMAIL) && $RCMAIL->config->get('use_https')) return true; return false; } +// for backward compatibility +function rcube_sess_unset($var_name=null) +{ + global $RCMAIL; + + $RCMAIL->session->remove($var_name); +} + /** * E-mail address validation -- cgit v1.2.3