r55236 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55235‎ | r55236 | r55237 >
Date:16:00, 18 August 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.3.2.
Modified paths:
  • /trunk/extensions/SemanticMaps/INSTALL (modified) (history)
  • /trunk/extensions/SemanticMaps/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMaps/SM_MapPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/INSTALL
@@ -1,4 +1,4 @@
2 -[[Semantic Maps 0.3]]
 2+[[Semantic Maps 0.3.2]]
33
44 Make sure you have Semantic MediaWiki and Maps successfully installed before
55 proceeding with the installation. Once you have downloaded the code, place
Index: trunk/extensions/SemanticMaps/RELEASE-NOTES
@@ -3,6 +3,13 @@
44 ==Semantic Maps change log==
55 This change log contains a list of completed to-do's (new features, bug fixes, refactoring) for every version of Semantic Maps.
66
 7+===Semantic Maps 0.3.1===
 8+(2009-08-18)
 9+
 10+====Bug fixes====
 11+
 12+* Fixed script design flaw that caused errors when using the 'map' format in a query.
 13+
714 ===Semantic Maps 0.3===
815 (2009-08-14)
916
Index: trunk/extensions/SemanticMaps/SM_MapPrinter.php
@@ -213,13 +213,20 @@
214214 private function setCentre() {
215215 if (strlen($this->centre) > 0) {
216216 // If a centre value is set, use it.
217 - list($this->centre_lat, $this->centre_lon) = MapsUtils::getLatLon($this->centre);
 217+ $centre = MapsUtils::getLatLon($this->centre);
 218+ $this->centre_lat = $centre['lat'];
 219+ $this->centre_lon = $centre['lon'];
218220 }
219 - else {
220 - // If centre is not set, set the values to null, to be auto determined by the JS of the mapping API.
 221+ elseif (count($this->m_locations) > 1) {
 222+ // If centre is not set, and there are multiple points, set the values to null, to be auto determined by the JS of the mapping API.
221223 $this->centre_lat = 'null';
222224 $this->centre_lon = 'null';
223 - }
 225+ }
 226+ else {
 227+ // If centre is not set and there is exactelly one marker, use it's coordinates.
 228+ $this->centre_lat = $this->m_locations[0][0];
 229+ $this->centre_lon = $this->m_locations[0][1];
 230+ }
224231 }
225232
226233 /**

Status & tagging log