mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
e107 model - reset system messages method added
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* e107 Base Model
|
* e107 Base Model
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
|
||||||
* $Revision: 1.50 $
|
* $Revision: 1.51 $
|
||||||
* $Date: 2009-12-23 15:12:12 $
|
* $Date: 2010-02-08 14:52:34 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -806,6 +806,19 @@ class e_model
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset model System messages
|
||||||
|
*
|
||||||
|
* @param boolean|string $type E_MESSAGE_INFO | E_MESSAGE_SUCCESS | E_MESSAGE_WARNING | E_MESSAGE_WARNING | E_MESSAGE_DEBUG | false (all)
|
||||||
|
* @param boolean $session reset also session messages
|
||||||
|
* @return e_model
|
||||||
|
*/
|
||||||
|
public function resetMessages($type = false, $session = false)
|
||||||
|
{
|
||||||
|
e107::getMessage()->reset($type, $this->_message_stack, $session);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set model message stack
|
* Set model message stack
|
||||||
* @param string $stack_name
|
* @param string $stack_name
|
||||||
@@ -1636,6 +1649,24 @@ class e_admin_model extends e_model
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset model System messages
|
||||||
|
*
|
||||||
|
* @param boolean|string $type E_MESSAGE_INFO | E_MESSAGE_SUCCESS | E_MESSAGE_WARNING | E_MESSAGE_WARNING | E_MESSAGE_DEBUG | false (all)
|
||||||
|
* @param boolean $session reset session messages
|
||||||
|
* @param boolean $validation reset validation messages as well
|
||||||
|
* @return e_admin_model
|
||||||
|
*/
|
||||||
|
public function resetMessages($type = false, $session = false, $validation = false)
|
||||||
|
{
|
||||||
|
if($validation)
|
||||||
|
{
|
||||||
|
e107::getMessage()->reset($type, $this->_message_stack.'_validator', $session);
|
||||||
|
}
|
||||||
|
parent::resetMessages($type, $session);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user