diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-12-26 14:35:01 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-12-26 14:35:33 +0100 |
commit | 6953090e7d789f52761a8f4b505cfbcf0c347018 (patch) | |
tree | 2b1794f92fd00a130b4fb8696bd6bbbaebd676cb /includes/pages | |
parent | f1b794697579d63a49345e50861b14874419bab5 (diff) |
392: Show warning message when editing html news without proper permissions to save them, Closes #392
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/admin_news.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/pages/admin_news.php b/includes/pages/admin_news.php index eb3a250e..7f912773 100644 --- a/includes/pages/admin_news.php +++ b/includes/pages/admin_news.php @@ -29,6 +29,15 @@ function admin_news() switch ($request->input('action')) { case 'edit': $user_source = User($news['UID']); + if ( + !in_array('admin_news_html', $privileges) + && strip_tags($news['Text']) != $news['Text'] + ) { + $html .= warning( + _('This message contains HTML. After saving the post some formatting will be lost!'), + true + ); + } $html .= form( [ |