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