https://bugzilla.wikimedia.org/show_bug.cgi?id=44216

       Web browser: ---
            Bug ID: 44216
           Summary: coordinates for globe with wrap = true does not work
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: GeoData
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

On dewiki we use the coordinate template also for globe=mars (for example) and
want using the parser function #coordinates also for this.

The german template allows decimal numbers as parameter, but #coordinates gives
a error for that.

For [[Eberswalde (crater)]] the coordinates are 24°S 33°W

Using coordinates with the abbr works:

{{#coordinates:24|S|33|W|globe=mars}}

But not with decimal numbers:

{{#coordinates:-24|-33|globe=mars}}

Message: {{#coordinates:}}: invalid longitude

In my opinion the problem is not respecting wrap = true in this statement:

if ( !is_numeric( $part )
 || $part < $min
 || $part > $max ) {
 return false;
}

in GeoData.body.php::parseOneCoord.

$part is -33, and $min is 0, that will give true and the longitude is "wrong"

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to