1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

message handler notice removal, session cleanup added

This commit is contained in:
secretr
2009-11-09 12:20:33 +00:00
parent 6f7dd0d76a
commit 0acdaaf867

View File

@@ -9,8 +9,8 @@
* Message Handler * Message Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $
* $Revision: 1.24 $ * $Revision: 1.25 $
* $Date: 2009-11-01 19:05:25 $ * $Date: 2009-11-09 12:20:33 $
* $Author: secretr $ * $Author: secretr $
* *
*/ */
@@ -76,6 +76,22 @@ class eMessage
require_once(e_HANDLER.'e107_class.php'); require_once(e_HANDLER.'e107_class.php');
$this->_session_id = e107::getPref('cookie_name', 'e107').'_system_messages'; $this->_session_id = e107::getPref('cookie_name', 'e107').'_system_messages';
//clean up old not used sessions
$tmp = array_keys($_SESSION);
foreach ($tmp as $key)
{
if($key != $this->_session_id && strpos($key, '_system_messages'))
{
unset($_SESSION[$key]);
}
}
unset($tmp);
if(!isset($_SESSION[$this->_session_id]))
{
$_SESSION[$this->_session_id] = array();
}
$this->reset()->mergeWithSession(); $this->reset()->mergeWithSession();
} }