r73776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73775‎ | r73776 | r73777 >
Date:15:26, 26 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
CHanges for 0.7 - fixed issue with width and height parameters
Modified paths:
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/includes/manipulations/Maps_ParamDimension.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMapsDispMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.php
@@ -49,7 +49,8 @@
5050 define( 'Maps_GEO_MIN', "'" );
5151 define( 'Maps_GEO_SEC', '"' );
5252
53 - $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
 53+ // TODO
 54+ $useExtensionPath = /*version_compare( $wgVersion, '1.16', '>=' ) &&*/ isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
5455 $egMapsScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/Maps';
5556 $egMapsDir = dirname( __FILE__ ) . '/';
5657 unset( $useExtensionPath );
Index: trunk/extensions/Maps/includes/manipulations/Maps_ParamDimension.php
@@ -69,6 +69,10 @@
7070 } else if ( $number > $max ) {
7171 $value = $max;
7272 }
 73+
 74+ if ( !preg_match( '/(px|ex|em|%)$/', $value ) ) {
 75+ $value .= 'px';
 76+ }
7377 }
7478
7579 }
\ No newline at end of file
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMapsDispMap.php
@@ -1,25 +1,13 @@
22 <?php
33
44 /**
5 - * Class for handling the display_map parser function with Google Maps
 5+ * Class for handling the display_map parser functions with Google Maps.
66 *
77 * @file Maps_GoogleMapsDispMap.php
88 * @ingroup MapsGoogleMaps
99 *
1010 * @author Jeroen De Dauw
1111 */
12 -
13 -if ( !defined( 'MEDIAWIKI' ) ) {
14 - die( 'Not an entry point.' );
15 -}
16 -
17 -/**
18 - * Class for handling the display_map parser functions with Google Maps.
19 - *
20 - * @ingroup MapsGoogleMaps
21 - *
22 - * @author Jeroen De Dauw
23 - */
2412 final class MapsGoogleMapsDispMap extends MapsBaseMap {
2513
2614 protected function initSpecificParamInfo( array &$parameters ) {

Status & tagging log