Permalink
Browse files

Allow multiple messages

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@393 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 6431d52 commit ff74bf07a1e904b60f8b91515edd6c48f18c9eaf jakubvrana committed Apr 18, 2008
Showing with 4 additions and 4 deletions.
  1. +3 −3 design.inc.php
  2. +1 −1 functions.inc.php
View
@@ -39,9 +39,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
echo "$title</p>\n";
}
echo "<h2>$title" . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . "</h2>\n";
- if ($_SESSION["message"]) {
- echo "<p class='message'>$_SESSION[message]</p>\n";
- $_SESSION["message"] = "";
+ if ($_SESSION["messages"]) {
+ echo "<p class='message'>" . implode("<br />", $_SESSION["messages"]) . "</p>\n";
+ $_SESSION["messages"] = array();
}
if (!$_SESSION["tokens"][$_GET["server"]]["?logout"]) {
$_SESSION["tokens"][$_GET["server"]]["?logout"] = rand(1, 1e6);
View
@@ -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)) {

0 comments on commit ff74bf0

Please sign in to comment.