MaxSem has uploaded a new change for review.
https://gerrit.wikimedia.org/r/59091
Change subject: Bug 47090: empty globe should be treated as $wgDefaultGlobe
......................................................................
Bug 47090: empty globe should be treated as $wgDefaultGlobe
Change-Id: Ie34ffc32a414af4a37fd9321c2193f4fcad6b285
---
M CoordinatesParserFunction.php
M tests/TagTest.php
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData
refs/changes/91/59091/1
diff --git a/CoordinatesParserFunction.php b/CoordinatesParserFunction.php
index b9336b6..4ea8969 100644
--- a/CoordinatesParserFunction.php
+++ b/CoordinatesParserFunction.php
@@ -136,7 +136,7 @@
if ( isset( $this->named['geohack'] ) ) {
$this->named = array_merge( $this->parseGeoHackArgs(
$this->named['geohack'] ), $this->named );
}
- $this->named['globe'] = isset( $this->named['globe'] )
+ $this->named['globe'] = ( isset( $this->named['globe'] ) &&
$this->named['globe'] )
? $wgContLang->lc( $this->named['globe'] )
: $wgDefaultGlobe;
}
diff --git a/tests/TagTest.php b/tests/TagTest.php
index 95ccbb7..8c1d1e8 100644
--- a/tests/TagTest.php
+++ b/tests/TagTest.php
@@ -137,6 +137,11 @@
'{{#coordinates: 10|20|scale:50000}}',
array( 'lat' => 10, 'lon' => 20, 'globe' =>
'earth', 'dim' => 5000 ),
),
+ // https://bugzilla.wikimedia.org/show_bug.cgi?id=47090
+ array(
+ '{{#coordinates: -3.29237|-60.624889|globe=}}',
+ array( 'lat' => -3.29237, 'lon' => -60.624889,
'globe' => 'earth' ),
+ ),
);
}
--
To view, visit https://gerrit.wikimedia.org/r/59091
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie34ffc32a414af4a37fd9321c2193f4fcad6b285
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits