Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -756,8 +756,9 @@ |
757 | 757 | $adding = false; |
758 | 758 | } else { |
759 | 759 | $adding = true; |
| 760 | + $from_pagenum = $links[3][0]; |
760 | 761 | } |
761 | | - for( $i=0; $i<count( $links[1] ); $i++) { |
| 762 | + for( $i=0; $i < count( $links[1] ); $i++) { |
762 | 763 | $text = $links[1][$i]; |
763 | 764 | $pagenum = $links[3][$i]; |
764 | 765 | if($text == $from ) { |
— | — | @@ -780,10 +781,13 @@ |
781 | 782 | $to_pagenum = $pagenum; |
782 | 783 | } |
783 | 784 | } |
| 785 | + if( !$to ) { |
| 786 | + $to_pagenum = $links[3][ count( $links[1] ) - 1 ]; |
| 787 | + } |
784 | 788 | } |
785 | 789 | |
786 | 790 | if( $header ) { |
787 | | - $h_out = '{{'.$header; |
| 791 | + $h_out = '{{:MediaWiki:Proofreadpage_header_template'; |
788 | 792 | //find next and previous pages in list |
789 | 793 | for( $i=1; $i < count( $text_links[1] ); $i++) { |
790 | 794 | if( $text_links[1][$i] == $wgTitle->getPrefixedText() ) { |