From 18346aa7e2cf5e0d23db48ab08fa23f0b4b6db73 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 2 Sep 2010 23:12:47 +0000 Subject: [PATCH] Remove unused global Simplify some logic --- includes/Preferences.php | 2 +- includes/parser/Parser.php | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index e8a574b796..01a70419fa 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1100,7 +1100,7 @@ class Preferences { } static function validateSignature( $signature, $alldata ) { - global $wgParser, $wgMaxSigChars, $wgLang; + global $wgMaxSigChars, $wgLang; if ( mb_strlen( $signature ) > $wgMaxSigChars ) { return Xml::element( 'span', array( 'class' => 'error' ), wfMsgExt( 'badsiglength', 'parsemag', diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 388cef7616..7bf14bf976 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2264,11 +2264,7 @@ class Parser { if ( $preOpenMatch and !$preCloseMatch ) { $this->mInPre = true; } - if ( $closematch ) { - $inBlockElem = false; - } else { - $inBlockElem = true; - } + $inBlockElem = !$closematch; } elseif ( !$inBlockElem && !$this->mInPre ) { if ( ' ' == substr( $t, 0, 1 ) and ( $this->mLastSection === 'pre' || trim( $t ) != '' ) ) { # pre -- 2.20.1