http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73724

Revision: 73724
Author:   jeroendedauw
Date:     2010-09-25 06:05:52 +0000 (Sat, 25 Sep 2010)

Log Message:
-----------
Changes for 0.7 - Follow up to r73723

Modified Paths:
--------------
    trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
    trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php

Modified: 
trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
===================================================================
--- trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php    
2010-09-25 06:02:47 UTC (rev 73723)
+++ trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php    
2010-09-25 06:05:52 UTC (rev 73724)
@@ -31,25 +31,18 @@
         * @since 0.5
         */     
        protected function initParameterInfo( array &$params ) {
-               global $egMapsGMaps3Type, $egMapsGMaps3Types;
+               global $egMapsGMaps3Type;
                
-               // TODO
-               //Validator::addOutputFormat( 'gmap3type', array( __CLASS__, 
'setGMapType' ) );
-               //Validator::addOutputFormat( 'gmap3types', array( __CLASS__, 
'setGMapTypes' ) );               
-               
                $params['type'] = new Parameter(
                        'type',
                        Parameter::TYPE_STRING,
-                       $egMapsGMaps3Type,// FIXME: default value should not be 
used when not present in types parameter.
+                       $egMapsGMaps3Type,
                        array(),
                        array(
                                new CriterionInArray( self::getTypeNames() ),
                        ),
-                       array( 'types' )                
                );
-
-               // TODO
-               $params['type']->outputTypes = array( 'gmap3type' => array( 
'gmap3type' ) );            
+               $params['type']->addManipulations( new MapsParamGMap3Type() );  
        
        }
        
        /**
@@ -125,30 +118,6 @@
        }
        
        /**
-        * Changes the map type name into the corresponding Google Maps API v3 
identifier.
-        *
-        * @param string $type
-        * 
-        * @return string
-        */
-       public static function setGMapType( &$type, $name, array $parameters ) {
-               $type = 'google.maps.MapTypeId.' . self::$mapTypes[ $type ];
-       }
-       
-       /**
-        * Changes the map type names into the corresponding Google Maps API v3 
identifiers.
-        * 
-        * @param array $types
-        * 
-        * @return array
-        */
-       public static function setGMapTypes( array &$types, $name, array 
$parameters ) {
-               for ( $i = count( $types ) - 1; $i >= 0; $i-- ) {
-                       self::setGMapType( $types[$i], $name, $parameters );
-               }
-       }
-       
-       /**
         * @see MapsMappingService::getDependencies
         * 
         * @return array

Modified: 
trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php
===================================================================
--- trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php 
2010-09-25 06:02:47 UTC (rev 73723)
+++ trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php 
2010-09-25 06:05:52 UTC (rev 73724)
@@ -29,7 +29,7 @@
         * @since 0.7
         */     
        public function doManipulation( &$value, array &$parameters ) {
-               $value = MapsGoogleMaps3::$mapTypes[$value];
+               $value = 'google.maps.MapTypeId.' . 
MapsGoogleMaps3::$mapTypes[$value];
        }
        
 }
\ No newline at end of file



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to