r72240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72239‎ | r72240 | r72241 >
Date:23:12, 2 September 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Remove unused global

Simplify some logic
Modified paths:
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -2264,11 +2264,7 @@
22652265 if ( $preOpenMatch and !$preCloseMatch ) {
22662266 $this->mInPre = true;
22672267 }
2268 - if ( $closematch ) {
2269 - $inBlockElem = false;
2270 - } else {
2271 - $inBlockElem = true;
2272 - }
 2268+ $inBlockElem = !$closematch;
22732269 } elseif ( !$inBlockElem && !$this->mInPre ) {
22742270 if ( ' ' == substr( $t, 0, 1 ) and ( $this->mLastSection === 'pre' || trim( $t ) != '' ) ) {
22752271 # pre
Index: trunk/phase3/includes/Preferences.php
@@ -1100,7 +1100,7 @@
11011101 }
11021102
11031103 static function validateSignature( $signature, $alldata ) {
1104 - global $wgParser, $wgMaxSigChars, $wgLang;
 1104+ global $wgMaxSigChars, $wgLang;
11051105 if ( mb_strlen( $signature ) > $wgMaxSigChars ) {
11061106 return Xml::element( 'span', array( 'class' => 'error' ),
11071107 wfMsgExt( 'badsiglength', 'parsemag',

Follow-up revisions

RevisionCommit summaryAuthorDate
r72246Partial revert of r72240reedy23:43, 2 September 2010

Comments

#Comment by Platonides (talk | contribs)   23:42, 2 September 2010

validateSignature uses $wgParser in

} elseif ( !empty( $alldata['fancysig'] ) &&
	false === $wgParser->validateSig( $signature ) ) {

Status & tagging log