r61321 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61320‎ | r61321 | r61322 >
Date:00:23, 21 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.3
* Small fixes
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3DispMap.php
@@ -58,21 +58,22 @@
5959 public function addSpecificMapHTML() {
6060 global $wgJsMimeType;
6161
62 - // TODO
6362 $this->output .=<<<END
64 -<div id="$this->mapName" style="width:100%; height:100%"></div>
 63+
 64+<div id="$this->mapName" class="$this->class" style="$this->style" ></div>
6565 <script type="$wgJsMimeType"> /*<![CDATA[*/
6666 addOnloadHook(
67 - function() {
68 - var latlng = new google.maps.LatLng(-34.397, 150.644);
69 - var myOptions = {
70 - zoom: 8,
71 - center: latlng,
72 - mapTypeId: google.maps.MapTypeId.ROADMAP
73 - };
74 - var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions);
75 -}
 67+ function() {
 68+ var latlng = new google.maps.LatLng(-34.397, 150.644);
 69+ var myOptions = {
 70+ zoom: 8,
 71+ center: latlng,
 72+ mapTypeId: google.maps.MapTypeId.ROADMAP
 73+ };
 74+ var map = new google.maps.Map(document.getElementById("$this->mapName"), myOptions);
 75+);
7676 /*]]>*/ </script>
 77+
7778 END;
7879
7980 }
Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php
@@ -65,7 +65,7 @@
6666 if (empty($egGoogleMaps3OnThisPage)) {
6767 $egGoogleMaps3OnThisPage = 0;
6868
69 - $output .= "<script type='$wgJsMimeType' src='http://maps.google.com/maps/api/js?sensor=false&language={$wgLang->getCode()}'><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion'></script>";
 69+ $output .= "<script type='$wgJsMimeType' src='http://maps.google.com/maps/api/js?sensor=false&amp;language={$wgLang->getCode()}'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps3/GoogleMap3Functions.js?$egMapsStyleVersion'></script>";
7070 }
7171 }
7272
Index: trunk/extensions/Maps/Maps.php
@@ -99,14 +99,14 @@
100100 // Loop through the available mapping features, load and initialize them.
101101 foreach($egMapsAvailableFeatures as $key => $values) {
102102 // Load and optionally initizlize feature.
103 - if (array_key_exists('class', $values) && array_key_exists('file', $values) && array_key_exists('local', $values)) {
 103+ if (array_key_exists('class', $values) && array_key_exists('file', $values)) {
104104 $wgAutoloadClasses[$values['class']] = array_key_exists('local', $values) && $values['local'] ? $egMapsIP . '/' . $values['file'] : $IP . '/extensions/' . $values['file'];
105105 if (method_exists($values['class'], 'initialize')) call_user_func(array($values['class'], 'initialize'));
106106 }
107107 }
108108
109109 // Loop through the available mapping services to load and initialize their general classes.
110 - foreach ($egMapsServices as $serviceData) {
 110+ foreach ($egMapsServices as $serviceData) {
111111 if (array_key_exists('classes', $serviceData)) {
112112 foreach($serviceData['classes'] as $class) {
113113 $file = array_key_exists('local', $class) && $class['local'] ? $egMapsIP . '/' . $class['file'] : $IP . '/extensions/' . $class['file'];
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php
@@ -199,7 +199,7 @@
200200
201201 MapsGoogleMaps::validateGoogleMapsKey();
202202
203 - $output .= "<script src='http://maps.google.com/maps?file=api&v=2&key=$egGoogleMapsKey&hl={$wgLang->getCode()}' type='$wgJsMimeType'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps/GoogleMapFunctions.min.js?$egMapsStyleVersion'></script><script type='$wgJsMimeType'>window.unload = GUnload;</script>";
 203+ $output .= "<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=$egGoogleMapsKey&amp;hl={$wgLang->getCode()}' type='$wgJsMimeType'></script><script type='$wgJsMimeType' src='$egMapsScriptPath/GoogleMaps/GoogleMapFunctions.min.js?$egMapsStyleVersion'></script><script type='$wgJsMimeType'>window.unload = GUnload;</script>";
204204 }
205205 }
206206
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php
@@ -153,7 +153,7 @@
154154
155155 if (empty($egYahooMapsOnThisPage)) {
156156 $egYahooMapsOnThisPage = 0;
157 - $output .= "<script type='$wgJsMimeType' src='http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=$egYahooMapsKey'></script>
 157+ $output .= "<script type='$wgJsMimeType' src='http://api.maps.yahoo.com/ajaxymap?v=3.8&amp;appid=$egYahooMapsKey'></script>
158158 <script type='$wgJsMimeType' src='$egMapsScriptPath/YahooMaps/YahooMapFunctions.min.js?$egMapsStyleVersion'></script>";
159159 }
160160 }

Status & tagging log