From ff74bf07a1e904b60f8b91515edd6c48f18c9eaf Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Fri, 18 Apr 2008 12:01:53 +0000 Subject: [PATCH] Allow multiple messages git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@393 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- design.inc.php | 6 +++--- functions.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/design.inc.php b/design.inc.php index 53172731..436336b1 100644 --- a/design.inc.php +++ b/design.inc.php @@ -39,9 +39,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { echo "$title

\n"; } echo "

$title" . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . "

\n"; - if ($_SESSION["message"]) { - echo "

$_SESSION[message]

\n"; - $_SESSION["message"] = ""; + if ($_SESSION["messages"]) { + echo "

" . implode("
", $_SESSION["messages"]) . "

\n"; + $_SESSION["messages"] = array(); } if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) { $_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6); diff --git a/functions.inc.php b/functions.inc.php index 6319ea74..e4d7cd99 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -186,7 +186,7 @@ function token_delete() { function redirect($location, $message = null) { if (isset($message)) { - $_SESSION["message"] = $message; + $_SESSION["messages"][] = $message; } token_delete(); if (strlen(SID)) {