r52496 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52495‎ | r52496 | r52497 >
Date:18:54, 27 June 2009
Author:thomasv
Status:deferred
Tags:
Comment:
call the parser outside loop
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -723,11 +723,10 @@
724724 for( $i=$from; $i<=$to;$i++ ) {
725725 $text = "$page_namespace:$index/" . $i;
726726 list($pagenum, $links, $mode) = pr_pageNumber($i,$params);
727 - $input = "{{:MediaWiki:Proofreadpage_pagenum_template|page=".$text."|num=$pagenum}}";
728 - $out.= $wgParser->recursiveTagParse($input);
729 - $input = "{{:".$text."}}";
730 - $out.= $wgParser->recursiveTagParse($input);
 727+ $out.= "<span>{{:MediaWiki:Proofreadpage_pagenum_template|page=".$text."|num=$pagenum}}</span>";
 728+ $out.= "{{:".$text."}}";
731729 }
 730+ $out = $wgParser->recursiveTagParse($out);
732731 }
733732 else {
734733 $adding = false;
@@ -736,13 +735,12 @@
737736 $pagenum = $links[3][$i];
738737 if($text == $page_namespace.":".$from ) $adding = true;
739738 if($adding){
740 - $input = "{{:MediaWiki:Proofreadpage_pagenum_template|page=".$text."|num=$pagenum}}";
741 - $out.= $wgParser->recursiveTagParse($input);
742 - $input= "{{:".$text."}}";
743 - $out.= $wgParser->recursiveTagParse($input);
 739+ $out.= "<span>{{:MediaWiki:Proofreadpage_pagenum_template|page=".$text."|num=$pagenum}}</span>";
 740+ $out.= "{{:".$text."}}";
744741 }
745742 if($text == $page_namespace.":".$to ) $adding = false;
746743 }
 744+ $out = $wgParser->recursiveTagParse($out);
747745 }
748746 return $out;
749747 }

Status & tagging log