Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3250,6 +3250,7 @@ |
3251 | 3251 | $part = explode( '|', $options); |
3252 | 3252 | |
3253 | 3253 | $mwThumb =& MagicWord::get( MAG_IMG_THUMBNAIL ); |
| 3254 | + $mwManualThumb =& MagicWord::get( MAG_IMG_MANUALTHUMB ); |
3254 | 3255 | $mwLeft =& MagicWord::get( MAG_IMG_LEFT ); |
3255 | 3256 | $mwRight =& MagicWord::get( MAG_IMG_RIGHT ); |
3256 | 3257 | $mwNone =& MagicWord::get( MAG_IMG_NONE ); |
— | — | @@ -3262,14 +3263,12 @@ |
3263 | 3264 | $manual_thumb = '' ; |
3264 | 3265 | |
3265 | 3266 | foreach( $part as $key => $val ) { |
3266 | | - $val_parts = explode ( '=' , $val , 2 ) ; |
3267 | | - $left_part = array_shift ( $val_parts ) ; |
3268 | 3267 | if ( $wgUseImageResize && ! is_null( $mwThumb->matchVariableStartToEnd($val) ) ) { |
3269 | 3268 | $thumb=true; |
3270 | | - } elseif ( $wgUseImageResize && count ( $val_parts ) == 1 && ! is_null( $mwThumb->matchVariableStartToEnd($left_part) ) ) { |
| 3269 | + } elseif ( ! is_null( $match = $mwManualThumb->matchVariableStartToEnd($val) ) ) { |
3271 | 3270 | # use manually specified thumbnail |
3272 | 3271 | $thumb=true; |
3273 | | - $manual_thumb = array_shift ( $val_parts ) ; |
| 3272 | + $manual_thumb = $match; |
3274 | 3273 | } elseif ( ! is_null( $mwRight->matchVariableStartToEnd($val) ) ) { |
3275 | 3274 | # remember to set an alignment, don't render immediately |
3276 | 3275 | $align = 'right'; |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | define('MAG_SCRIPTPATH', 41); |
57 | 57 | define('MAG_SERVERNAME', 42); |
58 | 58 | define('MAG_NUMBEROFFILES', 43); |
| 59 | +define('MAG_IMG_MANUALTHUMB', 44); |
59 | 60 | |
60 | 61 | $wgVariableIDs = array( |
61 | 62 | MAG_CURRENTMONTH, |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -212,6 +212,7 @@ |
213 | 213 | MAG_MSGNW => array( 0, 'MSGNW:' ), |
214 | 214 | MAG_END => array( 0, '__END__' ), |
215 | 215 | MAG_IMG_THUMBNAIL => array( 1, 'thumbnail', 'thumb' ), |
| 216 | + MAG_IMG_MANUALTHUMB => array( 1, 'thumbnail=$1', 'thumb=$1'), |
216 | 217 | MAG_IMG_RIGHT => array( 1, 'right' ), |
217 | 218 | MAG_IMG_LEFT => array( 1, 'left' ), |
218 | 219 | MAG_IMG_NONE => array( 1, 'none' ), |