r57056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57055‎ | r57056 | r57057 >
Date:14:14, 29 September 2009
Author:thomasv
Status:resolved
Tags:
Comment:
allow users to override parameters
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -820,12 +820,14 @@
821821 if( ( $i >= 1 ) && ( $i + 1 < count( $text_links[1] ) ) ) {
822822 $next = $text_links[0][$i+1];
823823 }
 824+ if( $args[$current] ) $current = $args[$current];
824825 if( $current ) $h_out .= "|current=$current";
825826 if( $prev ) $h_out .= "|prev=$prev";
826827 if( $next ) $h_out .= "|next=$next";
827828 if( $from_pagenum ) $h_out .= "|from=$from_pagenum";
828829 if( $to_pagenum ) $h_out .= "|to=$to_pagenum";
829830 foreach ( $attributes as $key => $val ) {
 831+ if( $args[$key] ) $val = $args[$key];
830832 $h_out .= "|$key=$val";
831833 }
832834 $h_out .= '}}';

Status & tagging log