From 6953090e7d789f52761a8f4b505cfbcf0c347018 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 26 Dec 2017 14:35:01 +0100 Subject: [PATCH] 392: Show warning message when editing html news without proper permissions to save them, Closes #392 --- includes/helper/message_helper.php | 22 +++++++++++++++++----- includes/pages/admin_news.php | 9 +++++++++ locale/de_DE.UTF-8/LC_MESSAGES/default.mo | Bin 43418 -> 43607 bytes locale/de_DE.UTF-8/LC_MESSAGES/default.po | 4 ++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php index 4fa0efe3..3d2b663a 100644 --- a/includes/helper/message_helper.php +++ b/includes/helper/message_helper.php @@ -1,7 +1,7 @@ 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( [ diff --git a/locale/de_DE.UTF-8/LC_MESSAGES/default.mo b/locale/de_DE.UTF-8/LC_MESSAGES/default.mo index d601751bd60a8c243993d77efad61dd90667a743..6cb4b88562cee1b7d9f7dffb87cd0a02fd3d0508 100644 GIT binary patch delta 10223 zcmXxp34Bgh8prYbhHNAxB9aKrn@x5E75kEQY_Zl-TaofcqJ$=~w8CrcV%JO4#Zp^K ztF20D(M_wCDn+%JqC=}XnWAaY8q%5HKlk*0=K7xJ+?@-ISK)EzdwU+g3hGnT(iT7dsrk0g}Eio8}B9B;kSQlqtEIxxx@O6yG zlg3-9_M)0q_vf`bP^eACFbqKt*1~C+igS(I(U16y@gmkGzJeOaE%e74%{j3)*2B73 zALCH>XPLM=hFf0C8c9JjDnef@Lp8A0xB)ewEf|P9(2aXhGyM+rd=*AwTqd)__85YL zQJKrbG+c;!?j7`_f9q=sdhnmv7=OnY3~k|bn2F)U?Xe*aK;1tPHL!)K%&b6lScb~z zR;-8bVh|oO@o7}1uA;XNg&P!ccS<6R;i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_-=9+xOQ;eq;v>wbBCmL_y3;MWp`6rs^_?SBCWmuVe%{8`1EMcA-7$6s`oGQ`V7XO z+%f54-tS0lc*W2Xz0mu0m_hX=2lvx-aMBmZ2|0lRJ zi#s>n>6w|HrtbR8Fz>%88%)_xT)(>qGsDu)Q=(5SS7J?yFCwCC? VUta4Ltv0MJi^|`S^kzZB{{gp{Mz#O| diff --git a/locale/de_DE.UTF-8/LC_MESSAGES/default.po b/locale/de_DE.UTF-8/LC_MESSAGES/default.po index 19247210..5779141d 100644 --- a/locale/de_DE.UTF-8/LC_MESSAGES/default.po +++ b/locale/de_DE.UTF-8/LC_MESSAGES/default.po @@ -1203,6 +1203,10 @@ msgstr "Log" msgid "Edit news entry" msgstr "News-Eintrag bearbeiten" +#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_news.php:37 +msgid "This message contains HTML. After saving the post some formatting will be lost!" +msgstr "Diese Nachricht beinhaltet HTML. Wenn du sie speicherst gehen diese Formatierungen verloren!" + #: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_news.php:36 msgid "Author" msgstr "Autor"