You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03: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:
@@ -113,7 +113,7 @@ function authentication_is_user() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an error message for display on the next page that is rendered.
|
* 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.
|
* Stores string in session. Flushed through header template.
|
||||||
* @see _flash_string()
|
* @see _flash_string()
|
||||||
@@ -124,8 +124,8 @@ function flash_error($string) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to display an info message on successful update.
|
* Used to display an info message on successful update.
|
||||||
* @param String $string
|
* @param String/Array message(s) to show.
|
||||||
* Stores data in sessio.
|
* Stores data in session.
|
||||||
* @see _flash_string()
|
* @see _flash_string()
|
||||||
*/
|
*/
|
||||||
function flash_info($string) {
|
function flash_info($string) {
|
||||||
@@ -135,6 +135,13 @@ function flash_info($string) {
|
|||||||
* 'Private' method used for flash_info() and flash_error().
|
* 'Private' method used for flash_info() and flash_error().
|
||||||
*/
|
*/
|
||||||
function _flash_string($type, $string) {
|
function _flash_string($type, $string) {
|
||||||
|
if (is_array($string)) {
|
||||||
|
foreach ($string as $singlestring) {
|
||||||
|
_flash_string($type, $singlestring);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($_SESSION['flash'])) {
|
if(!isset($_SESSION['flash'])) {
|
||||||
$_SESSION['flash'] = array();
|
$_SESSION['flash'] = array();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user