From 6c30fff0ba2369b84a1d77fa6b31cc2a19ccb68c Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 23 Oct 2014 13:03:14 -0700 Subject: [PATCH] Swap and for && Change-Id: I7821a62586cc2d2f929fb3d7d5046958a70efbd0 --- includes/EditPage.php | 2 +- includes/Linker.php | 2 +- includes/MimeMagic.php | 4 ++-- includes/Title.php | 2 +- includes/changes/RecentChange.php | 4 ++-- includes/parser/Parser.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 764f413f20..fa19c78078 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 { diff --git a/includes/Linker.php b/includes/Linker.php index 1d327be628..b4e4e2a0f0 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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; } } diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index bfd60111a5..3406831444 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -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 ); diff --git a/includes/Title.php b/includes/Title.php index c570633fdd..0efc94e832 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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' ); } } diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index e33274e8c6..d187c54f14 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -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'] ); } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e6478a4ed9..8dc95934f2 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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; -- 2.20.1