Remove unused global
authorSam Reed <reedy@users.mediawiki.org>
Thu, 2 Sep 2010 23:12:47 +0000 (23:12 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 2 Sep 2010 23:12:47 +0000 (23:12 +0000)
Simplify some logic

includes/Preferences.php
includes/parser/Parser.php

index e8a574b..01a7041 100644 (file)
@@ -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',
index 388cef7..7bf14bf 100644 (file)
@@ -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