r48821 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48820‎ | r48821 | r48822 >
Date:14:04, 25 March 2009
Author:thomasv
Status:ok
Tags:
Comment:
return correct type on error
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -185,11 +185,13 @@
186186
187187 function pr_parse_index($index_title, $page_title){
188188
 189+ $err = array( '', '', array() );
 190+
189191 $page_namespace = preg_quote( wfMsgForContent( 'proofreadpage_namespace' ), '/' );
190192 $index_namespace = preg_quote( wfMsgForContent( 'proofreadpage_index_namespace' ), '/' );
191193
192 - if( !$index_title ) return ;
193 - if( !$index_title->exists() ) return;
 194+ if( !$index_title ) return $err;
 195+ if( !$index_title->exists() ) return $err;
194196
195197 $rev = Revision::newFromTitle( $index_title );
196198 $text = $rev->getText();

Status & tagging log