diff options
Diffstat (limited to 'includes/pages/admin_news.php')
-rw-r--r-- | includes/pages/admin_news.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index bc78a6b1..eb3a250e 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -21,14 +21,13 @@ function admin_news() return error('Incomplete call, missing News ID.', true); } - $news = DB::select('SELECT * FROM `News` WHERE `ID`=? LIMIT 1', [$news_id]); + $news = DB::selectOne('SELECT * FROM `News` WHERE `ID`=? LIMIT 1', [$news_id]); if (empty($news)) { return error('No News found.', true); } switch ($request->input('action')) { case 'edit': - $news = array_shift($news); $user_source = User($news['UID']); $html .= form( @@ -81,7 +80,6 @@ function admin_news() break; case 'delete': - $news = array_shift($news); DB::delete('DELETE FROM `News` WHERE `ID`=? LIMIT 1', [$news_id]); engelsystem_log('News deleted: ' . $news['Betreff']); success(_('News entry deleted.')); |