Nischayn22 has uploaded a new change for review.

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


Change subject: Conditional operator with () returns false.
......................................................................

Conditional operator with () returns false.

Directly applying the patch given in the bug report. Thanks to orlodrim.
bug: 25373

Change-Id: I72b27e3dd22416288f3113e5a7c5a21ffbac01fb
---
M AbuseFilter.parser.php
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/53/55453/1

diff --git a/AbuseFilter.parser.php b/AbuseFilter.parser.php
index fa38d5d..dcb0f2a 100644
--- a/AbuseFilter.parser.php
+++ b/AbuseFilter.parser.php
@@ -926,12 +926,12 @@
 
                        $isTrue = $result->toBool();
 
-                       if ( $isTrue ) {
+                       if ( !$isTrue ) {
                                $scOrig = $this->mShortCircuit;
                                $this->mShortCircuit = $this->mAllowShort;
                        }
                        $this->doLevelConditions( $r1 );
-                       if ( $isTrue ) {
+                       if ( !$isTrue ) {
                                $this->mShortCircuit = $scOrig;
                        }
 
@@ -946,12 +946,12 @@
                                );
                        $this->move();
 
-                       if ( !$isTrue ) {
+                       if ( $isTrue ) {
                                $scOrig = $this->mShortCircuit;
                                $this->mShortCircuit = $this->mAllowShort;
                        }
                        $this->doLevelConditions( $r2 );
-                       if ( !$isTrue ) {
+                       if ( $isTrue ) {
                                $this->mShortCircuit = $scOrig;
                        }
 
@@ -981,12 +981,12 @@
 
                                $isTrue = $result->toBool();
 
-                               if ( $isTrue ) {
+                               if ( !$isTrue ) {
                                        $scOrig = $this->mShortCircuit;
                                        $this->mShortCircuit = 
$this->mAllowShort;
                                }
                                $this->doLevelConditions( $r1 );
-                               if ( $isTrue ) {
+                               if ( !$isTrue ) {
                                        $this->mShortCircuit = $scOrig;
                                }
 
@@ -1001,12 +1001,12 @@
                                        );
                                $this->move();
 
-                               if ( !$isTrue ) {
+                               if ( $isTrue ) {
                                        $scOrig = $this->mShortCircuit;
                                        $this->mShortCircuit = 
$this->mAllowShort;
                                }
                                $this->doLevelConditions( $r2 );
-                               if ( !$isTrue ) {
+                               if ( $isTrue ) {
                                        $this->mShortCircuit = $scOrig;
                                }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72b27e3dd22416288f3113e5a7c5a21ffbac01fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to