Allow multiple messages

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@393 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2008-04-18 12:01:53 +00:00
parent 6431d52800
commit ff74bf07a1
2 changed files with 4 additions and 4 deletions

View file

@ -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 file

@ -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)) {