r107865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107864‎ | r107865 | r107866 >
Date:08:36, 3 January 2012
Author:maxsem
Status:ok
Tags:
Comment:
Renamed #coordinate to #coordinates, comments
Modified paths:
  • /trunk/extensions/GeoData/GeoData.body.php (modified) (history)
  • /trunk/extensions/GeoData/GeoDataHooks.php (modified) (history)
  • /trunk/extensions/GeoData/GeoMath.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GeoData/GeoData.body.php
@@ -14,6 +14,11 @@
1515 && abs( $lon ) <= 180;
1616 }
1717
 18+ /**
 19+ * Returns primary coordinates of the given page, if any
 20+ * @param Title $title
 21+ * @return Coord: Coordinates or false
 22+ */
1823 public static function getPageCoordinates( Title $title ) {
1924 $dbr = wfGetDB( DB_SLAVE );
2025 $row = $dbr->selectRow( 'geo_tags',
Index: trunk/extensions/GeoData/GeoMath.php
@@ -12,8 +12,8 @@
1313
1414 /**
1515 * 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+ *
1818 * @param float $lat1
1919 * @param float $lon1
2020 * @param float $lat2
Index: trunk/extensions/GeoData/GeoDataHooks.php
@@ -14,7 +14,7 @@
1515 * @param Parser $parser
1616 */
1717 public static function onParserFirstCallInit( &$parser ) {
18 - $parser->setFunctionHook( 'coordinate', 'GeoDataHooks::coordinateHandler', SFH_OBJECT_ARGS );
 18+ $parser->setFunctionHook( 'coordinates', 'GeoDataHooks::coordinateHandler', SFH_OBJECT_ARGS );
1919 return true;
2020 }
2121
@@ -25,12 +25,12 @@
2626 * @param String $langCode
2727 */
2828 public static function onLanguageGetMagic( &$magicWords, $langCode ) {
29 - $magicWords['coordinate'] = array( 0, 'coordinate' );
 29+ $magicWords['coordinates'] = array( 0, 'coordinates' );
3030 return true;
3131 }
3232
3333 /**
34 - * Handler for the #coordinate parser function
 34+ * Handler for the #coordinates parser function
3535 *
3636 * @param Parser $parser
3737 * @param PPFrame $frame

Status & tagging log