jenkins-bot has submitted this change and it was merged.

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(+), 2 deletions(-)

Approvals:
  awjrichards: Verified; Looks good to me, approved
  jenkins-bot: Verified



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 1f9bb2c..deaa725 100644
--- a/tests/TagTest.php
+++ b/tests/TagTest.php
@@ -154,6 +154,10 @@
                                '{{#coordinates: 2.5|3,5}}',
                                array( 'lat' => 2.5, 'lon' => 3.5 ),
                                'de',
+                       // 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' ),
                        ),
                );
        }
@@ -178,4 +182,4 @@
                        ),
                );
        }
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/59091
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie34ffc32a414af4a37fd9321c2193f4fcad6b285
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to