Merge "mediawiki.page.gallery.resize: Remove weird mw.hook call"
[lhc/web/wiklou.git] / includes / specials / SpecialRevisiondelete.php
index 797f588..b90026a 100644 (file)
@@ -417,7 +417,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                                                Xml::listDropDown( 'wpRevDeleteReasonList',
                                                        $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->text(),
                                                        $this->msg( 'revdelete-reasonotherlist' )->inContentLanguage()->text(),
-                                                       $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' ), 'wpReasonDropDown', 1
+                                                       $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' ), 'wpReasonDropDown'
                                                ) .
                                        '</td>' .
                                "</tr><tr>\n" .
@@ -572,12 +572,12 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                // from dropdown
                $listReason = $this->getRequest()->getText( 'wpRevDeleteReasonList', 'other' );
                $comment = $listReason;
-               if ( $comment != 'other' && $this->otherReason != '' ) {
+               if ( $comment === 'other' ) {
+                       $comment = $this->otherReason;
+               } elseif ( $this->otherReason !== '' ) {
                        // Entry from drop down menu + additional comment
                        $comment .= $this->msg( 'colon-separator' )->inContentLanguage()->text()
                                . $this->otherReason;
-               } elseif ( $comment == 'other' ) {
-                       $comment = $this->otherReason;
                }
                # Can the user set this field?
                if ( $bitParams[Revision::DELETED_RESTRICTED] == 1