r70956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70955‎ | r70956 | r70957 >
Date:14:20, 12 August 2010
Author:thomasv
Status:ok
Tags:
Comment:
abort if the page tag is called in the Page namespace
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -746,6 +746,10 @@
747747 if ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) {
748748 return "";
749749 }
 750+ # abort too if the tag is in the page namespace
 751+ if ( preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $parser->Title()->getPrefixedText() ) ) {
 752+ return "";
 753+ }
750754 if( ! $index ) {
751755 return '<strong class="error">' . wfMsgForContent( 'proofreadpage_index_expected' ) . '</strong>';
752756 }

Status & tagging log