Index: trunk/phase3/includes/Parser.php |
— | — | @@ -4569,6 +4569,17 @@ |
4570 | 4570 | if ( isset( $paramMap[$magicName] ) ) { |
4571 | 4571 | list( $type, $paramName ) = $paramMap[$magicName]; |
4572 | 4572 | $params[$type][$paramName] = $value; |
| 4573 | + |
| 4574 | + // Special case; width and height come in one variable together |
| 4575 | + if( $type == 'handler' && $paramName == 'width' ) { |
| 4576 | + $m = array(); |
| 4577 | + if ( preg_match( '/^([0-9]*)x([0-9]*)$/', $value, $m ) ) { |
| 4578 | + $params[$type]['width'] = intval( $m[1] ); |
| 4579 | + $params[$type]['height'] = intval( $m[2] ); |
| 4580 | + } else { |
| 4581 | + $params[$type]['width'] = intval( $value ); |
| 4582 | + } |
| 4583 | + } |
4573 | 4584 | } else { |
4574 | 4585 | $caption = $part; |
4575 | 4586 | } |