r56035 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56034‎ | r56035 | r56036 >
Date:15:12, 8 September 2009
Author:thomasv
Status:deferred
Tags:
Comment:
minor fix for pagenum; use system message for header template
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -756,8 +756,9 @@
757757 $adding = false;
758758 } else {
759759 $adding = true;
 760+ $from_pagenum = $links[3][0];
760761 }
761 - for( $i=0; $i<count( $links[1] ); $i++) {
 762+ for( $i=0; $i < count( $links[1] ); $i++) {
762763 $text = $links[1][$i];
763764 $pagenum = $links[3][$i];
764765 if($text == $from ) {
@@ -780,10 +781,13 @@
781782 $to_pagenum = $pagenum;
782783 }
783784 }
 785+ if( !$to ) {
 786+ $to_pagenum = $links[3][ count( $links[1] ) - 1 ];
 787+ }
784788 }
785789
786790 if( $header ) {
787 - $h_out = '{{'.$header;
 791+ $h_out = '{{:MediaWiki:Proofreadpage_header_template';
788792 //find next and previous pages in list
789793 for( $i=1; $i < count( $text_links[1] ); $i++) {
790794 if( $text_links[1][$i] == $wgTitle->getPrefixedText() ) {

Status & tagging log