From b60603d76c286937875afb0ba267be3d7f880a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Sat, 29 Dec 2012 14:35:53 +0100 Subject: [PATCH] news reload duplication bug fixed --- includes/pages/user_news.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 95cc345e..a8d819d0 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -107,7 +107,7 @@ function user_news_comments() { function user_news() { global $DISPLAY_NEWS, $privileges, $user; - $html = ""; + $html = msg(); if (isset ($_POST["text"]) && isset ($_POST["betreff"]) && in_array("admin_news", $privileges)) { if (!isset ($_POST["treffen"]) || !in_array("admin_news", $privileges)) @@ -116,7 +116,8 @@ function user_news() { "VALUES ('" . sql_escape(time()) . "', '" . sql_escape($_POST["betreff"]) . "', '" . sql_escape($_POST["text"]) . "', '" . sql_escape($user['UID']) . "', '" . sql_escape($_POST["treffen"]) . "');"); engelsystem_log("Created news: " . $_POST["betreff"] . ", treffen: " . $_POST["treffen"]); - $html .= success(Get_Text(4), true); + success(Get_Text(4)); + redirect(page_link_to('user_news')); } if (isset ($_REQUEST['page']) && preg_match("/^[0-9]{1,}$/", $_REQUEST['page']))