r21715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21714‎ | r21715 | r21716 >
Date:10:28, 30 April 2007
Author:tstarling
Status:old
Tags:
Comment:
Restore original page-width parameter string, accidentally changed to width-page during reorganisation.
Modified paths:
  • /trunk/phase3/includes/media/DjVu.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/DjVu.php
@@ -34,13 +34,13 @@
3535 if ( !isset( $params['width'] ) ) {
3636 return false;
3737 }
38 - return "{$params['width']}px-page{$page}";
 38+ return "page{$page}-{$params['width']}px";
3939 }
4040
4141 function parseParamString( $str ) {
4242 $m = false;
43 - if ( preg_match( '/^(\d+)px-page(\d+)$/', $str, $m ) ) {
44 - return array( 'width' => $m[1], 'page' => $m[2] );
 43+ if ( preg_match( '/^page(\d+)-(\d+)px$/', $str, $m ) ) {
 44+ return array( 'width' => $m[2], 'page' => $m[1] );
4545 } else {
4646 return false;
4747 }