Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/135444

Change subject: Swap if/elseif in SpecialRevisiondelete.php
......................................................................

Swap if/elseif in SpecialRevisiondelete.php

This avoids checking $comment twice
by Krinkle on I3b21f66f84d68777a18e66e4e5f59886e55d7936

Change-Id: I39df27d3edb097024d136455145505429ccdbe39
---
M includes/specials/SpecialRevisiondelete.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/135444/1

diff --git a/includes/specials/SpecialRevisiondelete.php 
b/includes/specials/SpecialRevisiondelete.php
index 797f588..d3b168b 100644
--- a/includes/specials/SpecialRevisiondelete.php
+++ b/includes/specials/SpecialRevisiondelete.php
@@ -572,12 +572,12 @@
                // 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

-- 
To view, visit https://gerrit.wikimedia.org/r/135444
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39df27d3edb097024d136455145505429ccdbe39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to