diff options
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/admin_news.php | 8 | ||||
-rw-r--r-- | includes/pages/user_news.php | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index 0653a045..a4474ff9 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -38,7 +38,13 @@ function admin_news() { case 'save': list($news) = $news; - sql_query("UPDATE `News` SET `Datum`='" . sql_escape(time()) . "', `Betreff`='" . sql_escape($_POST["eBetreff"]) . "', `Text`='" . sql_escape($_POST["eText"]) . "', `UID`='" . sql_escape($user['UID']) . "', `Treffen`='" . sql_escape($_POST["eTreffen"]) . "' WHERE `ID`=" . sql_escape($id) . " LIMIT 1"); + sql_query("UPDATE `News` SET + `Datum`='" . sql_escape(time()) . "', + `Betreff`='" . sql_escape($_POST["eBetreff"]) . "', + `Text`='" . sql_escape($_POST["eText"]) . "', + `UID`='" . sql_escape($user['UID']) . "', + `Treffen`='" . sql_escape($_POST["eTreffen"]) . "' + WHERE `ID`=" . sql_escape($id)); engelsystem_log("News updated: " . $_POST["eBetreff"]); success(_("News entry updated.")); redirect(page_link_to("news")); diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 8a4c0aa8..9536c2ea 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -132,7 +132,7 @@ function user_news() { else $page = 0; - $news = sql_select("SELECT * FROM `News` ORDER BY `ID` DESC LIMIT " . sql_escape($page * $DISPLAY_NEWS) . ", " . sql_escape($DISPLAY_NEWS)); + $news = sql_select("SELECT * FROM `News` ORDER BY `Datum` DESC LIMIT " . sql_escape($page * $DISPLAY_NEWS) . ", " . sql_escape($DISPLAY_NEWS)); foreach ($news as $entry) $html .= display_news($entry); |