Index: trunk/extensions/GeoData/GeoData.body.php |
— | — | @@ -14,6 +14,11 @@ |
15 | 15 | && abs( $lon ) <= 180; |
16 | 16 | } |
17 | 17 | |
| 18 | + /** |
| 19 | + * Returns primary coordinates of the given page, if any |
| 20 | + * @param Title $title |
| 21 | + * @return Coord: Coordinates or false |
| 22 | + */ |
18 | 23 | public static function getPageCoordinates( Title $title ) { |
19 | 24 | $dbr = wfGetDB( DB_SLAVE ); |
20 | 25 | $row = $dbr->selectRow( 'geo_tags', |
Index: trunk/extensions/GeoData/GeoMath.php |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Calculates distance between two coordinates |
16 | | - * See https://en.wikipedia.org/wiki/Haversine_formula |
17 | | - * |
| 16 | + * @see https://en.wikipedia.org/wiki/Haversine_formula |
| 17 | + * |
18 | 18 | * @param float $lat1 |
19 | 19 | * @param float $lon1 |
20 | 20 | * @param float $lat2 |
Index: trunk/extensions/GeoData/GeoDataHooks.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * @param Parser $parser |
16 | 16 | */ |
17 | 17 | public static function onParserFirstCallInit( &$parser ) { |
18 | | - $parser->setFunctionHook( 'coordinate', 'GeoDataHooks::coordinateHandler', SFH_OBJECT_ARGS ); |
| 18 | + $parser->setFunctionHook( 'coordinates', 'GeoDataHooks::coordinateHandler', SFH_OBJECT_ARGS ); |
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | |
— | — | @@ -25,12 +25,12 @@ |
26 | 26 | * @param String $langCode |
27 | 27 | */ |
28 | 28 | public static function onLanguageGetMagic( &$magicWords, $langCode ) { |
29 | | - $magicWords['coordinate'] = array( 0, 'coordinate' ); |
| 29 | + $magicWords['coordinates'] = array( 0, 'coordinates' ); |
30 | 30 | return true; |
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | | - * Handler for the #coordinate parser function |
| 34 | + * Handler for the #coordinates parser function |
35 | 35 | * |
36 | 36 | * @param Parser $parser |
37 | 37 | * @param PPFrame $frame |