mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
functions.inc.php:
- _flash_string(): also accept an array of messages, not only a string - comment updates for _flash_info() and flash_error() to reflect this change git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1378 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
a9f252baea
commit
b3cdbfe88a
@ -113,7 +113,7 @@ function authentication_is_user() {
|
||||
|
||||
/**
|
||||
* Add an error message for display on the next page that is rendered.
|
||||
* @param String message to show.
|
||||
* @param String/Array message(s) to show.
|
||||
*
|
||||
* Stores string in session. Flushed through header template.
|
||||
* @see _flash_string()
|
||||
@ -124,8 +124,8 @@ function flash_error($string) {
|
||||
|
||||
/**
|
||||
* Used to display an info message on successful update.
|
||||
* @param String $string
|
||||
* Stores data in sessio.
|
||||
* @param String/Array message(s) to show.
|
||||
* Stores data in session.
|
||||
* @see _flash_string()
|
||||
*/
|
||||
function flash_info($string) {
|
||||
@ -135,6 +135,13 @@ function flash_info($string) {
|
||||
* 'Private' method used for flash_info() and flash_error().
|
||||
*/
|
||||
function _flash_string($type, $string) {
|
||||
if (is_array($string)) {
|
||||
foreach ($string as $singlestring) {
|
||||
_flash_string($type, $singlestring);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['flash'])) {
|
||||
$_SESSION['flash'] = array();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user