r92322 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92321‎ | r92322 | r92323 >
Date:22:05, 15 July 2011
Author:brion
Status:deferred
Tags:
Comment:
MFT r92300 - revert r84874 accidental breakage in ProofreadPage
Modified paths:
  • /branches/REL1_18/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/ProofreadPage/ProofreadPage_body.php
@@ -311,22 +311,23 @@
312312 }
313313 $out->proofreadPageDone = true;
314314
315 - switch( $wgTitle->getNamespace() ) {
316 - case $this->page_namespace:
317 - if ( preg_match( "/^{$this->page_namespace}:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) {
318 - $this->preparePage( $out, $m, $isEdit );
319 - return true;
320 - }
321 - break;
322 - case $this->index_namespace:
323 - $this->prepareIndex( $out );
324 - break;
325 - case NS_MAIN:
326 - $this->prepareArticle( $out );
327 - break;
 315+ $page_namespace = $this->page_namespace;
 316+ if ( preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) {
 317+ $this->preparePage( $out, $m, $isEdit );
 318+ return true;
328319 }
329 - return true;
330320
 321+ $index_namespace = $this->index_namespace;
 322+ if ( $isEdit && ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) ) {
 323+ $this->prepareIndex( $out );
 324+ return true;
 325+ }
 326+
 327+ if( $wgTitle->getNamespace() == NS_MAIN ) {
 328+ $this->prepareArticle( $out );
 329+ return true;
 330+ }
 331+
331332 return true;
332333 }
333334

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84874Clean up extra needless preg_match() calls done on every BeforePageDisplay ca...demon19:07, 27 March 2011
r92300Revert r84874: breaks ProofreadPage's UI completely by incorrectly comparing ...brion20:30, 15 July 2011

Status & tagging log