Swap and for &&
authorChad Horohoe <chadh@wikimedia.org>
Thu, 23 Oct 2014 20:03:14 +0000 (13:03 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Thu, 23 Oct 2014 20:03:14 +0000 (13:03 -0700)
Change-Id: I7821a62586cc2d2f929fb3d7d5046958a70efbd0

includes/EditPage.php
includes/Linker.php
includes/MimeMagic.php
includes/Title.php
includes/changes/RecentChange.php
includes/parser/Parser.php

index 764f413..fa19c78 100644 (file)
@@ -3984,7 +3984,7 @@ HTML
                                // Do some sanity checks. These aren't needed for reversibility,
                                // but should help keep the breakage down if the editor
                                // breaks one of the entities whilst editing.
-                               if ( ( substr( $invalue, $i, 1 ) == ";" ) and ( strlen( $hexstring ) <= 6 ) ) {
+                               if ( ( substr( $invalue, $i, 1 ) == ";" ) && ( strlen( $hexstring ) <= 6 ) ) {
                                        $codepoint = hexdec( $hexstring );
                                        $result .= codepointToUtf8( $codepoint );
                                } else {
index 1d327be..b4e4e2a 100644 (file)
@@ -364,7 +364,7 @@ class Linker {
                foreach ( $merged as $key => $val ) {
                        # A false value suppresses the attribute, and we don't want the
                        # href attribute to be overridden.
-                       if ( $key != 'href' and $val !== false ) {
+                       if ( $key != 'href' && $val !== false ) {
                                $ret[$key] = $val;
                        }
                }
index bfd6011..3406831 100644 (file)
@@ -210,7 +210,7 @@ class MimeMagic {
                }
 
                if ( $mimeTypeFile ) {
-                       if ( is_file( $mimeTypeFile ) and is_readable( $mimeTypeFile ) ) {
+                       if ( is_file( $mimeTypeFile ) && is_readable( $mimeTypeFile ) ) {
                                wfDebug( __METHOD__ . ": loading mime types from $mimeTypeFile\n" );
                                $types .= "\n";
                                $types .= file_get_contents( $mimeTypeFile );
@@ -287,7 +287,7 @@ class MimeMagic {
                $info = MM_WELL_KNOWN_MIME_INFO;
 
                if ( $mimeInfoFile ) {
-                       if ( is_file( $mimeInfoFile ) and is_readable( $mimeInfoFile ) ) {
+                       if ( is_file( $mimeInfoFile ) && is_readable( $mimeInfoFile ) ) {
                                wfDebug( __METHOD__ . ": loading mime info from $mimeInfoFile\n" );
                                $info .= "\n";
                                $info .= file_get_contents( $mimeInfoFile );
index c570633..0efc94e 100644 (file)
@@ -3647,7 +3647,7 @@ class Title {
                        if ( $right == 'autoconfirmed' ) {
                                $right = 'editsemiprotected'; // B/C
                        }
-                       if ( $tp and !$wgUser->isAllowed( $right ) ) {
+                       if ( $tp && !$wgUser->isAllowed( $right ) ) {
                                $errors[] = array( 'cantmove-titleprotected' );
                        }
                }
index e33274e..d187c54 100644 (file)
@@ -283,7 +283,7 @@ class RecentChange {
                }
 
                # If our database is strict about IP addresses, use NULL instead of an empty string
-               if ( $dbw->strictIPs() and $this->mAttribs['rc_ip'] == '' ) {
+               if ( $dbw->strictIPs() && $this->mAttribs['rc_ip'] == '' ) {
                        unset( $this->mAttribs['rc_ip'] );
                }
 
@@ -298,7 +298,7 @@ class RecentChange {
                $this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
 
                ## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
-               if ( $dbw->cascadingDeletes() and $this->mAttribs['rc_cur_id'] == 0 ) {
+               if ( $dbw->cascadingDeletes() && $this->mAttribs['rc_cur_id'] == 0 ) {
                        unset( $this->mAttribs['rc_cur_id'] );
                }
 
index e6478a4..8dc9593 100644 (file)
@@ -2598,7 +2598,7 @@ class Parser {
                                        $paragraphStack = false;
                                        # @todo bug 5718: paragraph closed
                                        $output .= $this->closeParagraph();
-                                       if ( $preOpenMatch and !$preCloseMatch ) {
+                                       if ( $preOpenMatch && !$preCloseMatch ) {
                                                $this->mInPre = true;
                                        }
                                        $bqOffset = 0;