mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 15:46:44 +02:00
Introducing e_model_admin handler: automated tasks as validate, sql queries, handle posted data, more to come (work in progress); Various imporvements/fixes (core handlers)
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
* Message Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $
|
||||
* $Revision: 1.18 $
|
||||
* $Date: 2009-09-21 12:52:52 $
|
||||
* $Revision: 1.19 $
|
||||
* $Date: 2009-10-20 16:05:03 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
@@ -248,6 +248,29 @@ class eMessage
|
||||
|
||||
return (true === $raw ? $message : self::formatMessage($mstack, $type, $message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all messages for a stack
|
||||
*
|
||||
* @param string $mstack message stack name
|
||||
* @param bool $raw force array return
|
||||
* @param bool $reset reset message type stack
|
||||
* @return array messages
|
||||
*/
|
||||
public function getAll($mstack = 'default', $raw = false, $reset = true)
|
||||
{
|
||||
$ret = array();
|
||||
foreach ($this->_get_types() as $type)
|
||||
{
|
||||
$message = $this->get($type, $mstack, $raw, $reset);
|
||||
if(!empty($message))
|
||||
{
|
||||
$ret[$type] = $message;
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Session message getter
|
||||
@@ -265,6 +288,29 @@ class eMessage
|
||||
|
||||
return (true === $raw ? $message : self::formatMessage($mstack, $type, $message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all session messages for a stack
|
||||
*
|
||||
* @param string $mstack message stack name
|
||||
* @param bool $raw force array return
|
||||
* @param bool $reset reset message type stack
|
||||
* @return array session messages
|
||||
*/
|
||||
public function getAllSession($mstack = 'default', $raw = false, $reset = true)
|
||||
{
|
||||
$ret = array();
|
||||
foreach ($this->_get_types() as $type)
|
||||
{
|
||||
$message = $this->getSession($type, $mstack, $raw, $reset);
|
||||
if(!empty($message))
|
||||
{
|
||||
$ret[$type] = $message;
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output all accumulated messages
|
||||
@@ -471,9 +517,9 @@ class eMessage
|
||||
if(!isset($this->_sysmsg[$_type][$to_stack]))
|
||||
{
|
||||
$this->_sysmsg[$_type][$to_stack] = array();
|
||||
array_merge($this->_sysmsg[$_type][$from_stack], $this->_sysmsg[$_type][$to_stack]);
|
||||
unset($this->_sysmsg[$_type][$to_stack]);
|
||||
}
|
||||
array_merge($this->_sysmsg[$_type][$from_stack], $this->_sysmsg[$_type][$to_stack]);
|
||||
unset($this->_sysmsg[$_type][$to_stack]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,9 +550,9 @@ class eMessage
|
||||
if(!isset($_SESSION[$this->_session_id][$_type][$to_stack]))
|
||||
{
|
||||
$this->_sysmsg[$_type][$to_stack] = array();
|
||||
array_merge($_SESSION[$this->_session_id][$_type][$from_stack], $this->_sysmsg[$_type][$to_stack]);
|
||||
unset($_SESSION[$this->_session_id][$_type][$to_stack]);
|
||||
}
|
||||
array_merge($_SESSION[$this->_session_id][$_type][$from_stack], $this->_sysmsg[$_type][$to_stack]);
|
||||
unset($_SESSION[$this->_session_id][$_type][$to_stack]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user