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

Revision: 68069
Author:   jeroendedauw
Date:     2010-06-15 12:57:54 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
Changes for 0.6.3 - Fixed issue with map result formats on special pages

Modified Paths:
--------------
    trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
    trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php
    trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php
    trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php

Modified: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php
===================================================================
--- trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php      
2010-06-15 12:43:14 UTC (rev 68068)
+++ trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php      
2010-06-15 12:57:54 UTC (rev 68069)
@@ -349,14 +349,13 @@
        
        /**
         * Sets the $mapName field, using the $elementNamePrefix and $elementNr.
-        *
         */
        protected function setMapName() {
                $this->mapName = $this->elementNamePrefix . '_' . 
$this->elementNr;
        }
        
        public final function getName() {
-               return wfMsg( 'maps_' . $this->serviceName );
+               return wfMsg( 'maps_' . $this->mService->getName() );
        }
        
     public function getParameters() {

Modified: trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php
===================================================================
--- trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php       
2010-06-15 12:43:14 UTC (rev 68068)
+++ trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMapsQP.php       
2010-06-15 12:57:54 UTC (rev 68069)
@@ -78,8 +78,7 @@
                        wfMsg( 'maps-loading-map' )
                );
                
-               $parser->getOutput()->addHeadItem(
-                       Html::inlineScript( <<<EOT
+               $headItem = Html::inlineScript( <<<EOT
 addOnloadHook(
        function() {
                initializeGoogleMap('$this->mapName', 
@@ -97,7 +96,9 @@
        }
 );
 EOT
-               ) );
+               );
+               
+               SMWOutputs::requireHeadItem( md5( $headItem ), $headItem );
        }
        
        /**

Modified: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php
===================================================================
--- trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php       
2010-06-15 12:43:14 UTC (rev 68068)
+++ trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayersQP.php       
2010-06-15 12:57:54 UTC (rev 68069)
@@ -67,8 +67,7 @@
                
                $layerItems = 
MapsOpenLayers::createLayersStringAndLoadDependencies( $this->output, 
$this->layers );
                
-               $parser->getOutput()->addHeadItem(
-                       Html::inlineScript( <<<EOT
+               $headItem = Html::inlineScript( <<<EOT
 addOnloadHook(
        function() {
                initOpenLayer(
@@ -83,7 +82,9 @@
        }
 );
 EOT
-               ) );
+               );
+               
+               SMWOutputs::requireHeadItem( md5( $headItem ), $headItem );
        }
 
        /**

Modified: trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php
===================================================================
--- trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php 
2010-06-15 12:43:14 UTC (rev 68068)
+++ trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMapsQP.php 
2010-06-15 12:57:54 UTC (rev 68069)
@@ -65,8 +65,7 @@
                        wfMsg( 'maps-loading-map' )
                );
                
-               $parser->getOutput()->addHeadItem(
-                       Html::inlineScript( <<<EOT
+               $headItem = Html::inlineScript( <<<EOT
 addOnloadHook(
        function() {
                initializeYahooMap(
@@ -83,7 +82,9 @@
        }
 );
 EOT
-               ) );
+               );
+               
+               SMWOutputs::requireHeadItem( md5( $headItem ), $headItem );
        }
 
        /**



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to