https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114713

Revision: 114713
Author:   maxsem
Date:     2012-04-04 18:37:47 +0000 (Wed, 04 Apr 2012)
Log Message:
-----------
Doxygen warnings, unused variables

Modified Paths:
--------------
    trunk/extensions/GeoData/CoordinatesParserFunction.php
    trunk/extensions/GeoData/GeoData.body.php
    trunk/extensions/GeoData/GeoDataHooks.php
    trunk/extensions/GeoData/api/ApiQueryAllPages_GeoData.php
    trunk/extensions/GeoData/api/ApiQueryCategoryMembers_GeoData.php
    trunk/extensions/GeoData/api/ApiQueryGeoSearch.php

Modified: trunk/extensions/GeoData/CoordinatesParserFunction.php
===================================================================
--- trunk/extensions/GeoData/CoordinatesParserFunction.php      2012-04-04 
18:36:07 UTC (rev 114712)
+++ trunk/extensions/GeoData/CoordinatesParserFunction.php      2012-04-04 
18:37:47 UTC (rev 114713)
@@ -126,8 +126,7 @@
        }
 
        /**
-        *
-        * @param Coord $coord
+        * Merges parameters with decoded GeoHack data, sets default globe
         */
        private function parseTagArgs() {
                global $wgDefaultGlobe, $wgContLang;

Modified: trunk/extensions/GeoData/GeoData.body.php
===================================================================
--- trunk/extensions/GeoData/GeoData.body.php   2012-04-04 18:36:07 UTC (rev 
114712)
+++ trunk/extensions/GeoData/GeoData.body.php   2012-04-04 18:37:47 UTC (rev 
114713)
@@ -3,9 +3,10 @@
 class GeoData {
        /**
         *
-        * @param type $lat
-        * @param type $lon
-        * @return Boolean: Whether the coordinate is valid
+        * @param float $lat
+        * @param float $lon
+        * @param string $globe
+        * @return bool: Whether the coordinate is valid
         */
        public static function validateCoord( $lat, $lon, $globe ) {
                global $wgGlobes;
@@ -22,7 +23,7 @@
        /**
         * Returns primary coordinates of the given page, if any
         * @param Title $title
-        * @return Coord|false: Coordinates or false
+        * @return Coord|bool: Coordinates or false
         */
        public static function getPageCoordinates( Title $title ) {
                $coords = self::getAllCoordinates( $title->getArticleID(), 
array( 'gt_primary' => 1 ) );
@@ -57,10 +58,10 @@
         * 
         * @param Array $parts: Array of coordinate components
         * @param String $globe: Globe name
-        * @returns Status: Status object, in case of success its value is a 
Coord object.
+        * @return Status: Status object, in case of success its value is a 
Coord object.
         */
        public static function parseCoordinates( $parts, $globe ) {
-               global $wgContLang, $wgGlobes;
+               global $wgGlobes;
 
                $count = count( $parts );
                if ( !is_array( $parts ) || $count < 2 || $count > 8 || ( 
$count % 2 ) ) {

Modified: trunk/extensions/GeoData/GeoDataHooks.php
===================================================================
--- trunk/extensions/GeoData/GeoDataHooks.php   2012-04-04 18:36:07 UTC (rev 
114712)
+++ trunk/extensions/GeoData/GeoDataHooks.php   2012-04-04 18:37:47 UTC (rev 
114713)
@@ -4,7 +4,9 @@
        /**
         * LoadExtensionSchemaUpdates hook handler
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
+        *
         * @param DatabaseUpdater $updater
+        * @return bool
         */
        public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
                switch ( $updater->getDB()->getType() ) {
@@ -20,8 +22,10 @@
 
        /**
         * UnitTestsList hook handler
-        * @see: https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
-        * @param Array $files 
+        * @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
+        *
+        * @param Array $files
+        * @return bool
         */
        public static function onUnitTestsList( &$files ) {
                $dir = dirname( __FILE__ ) . "/tests";
@@ -34,8 +38,10 @@
 
        /**
         * ParserFirstCallInit hook handler
-        * @see: https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
-        * @param Parser $parser 
+        * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
+        *
+        * @param Parser $parser
+        * @return bool
         */
        public static function onParserFirstCallInit( &$parser ) {
                $parser->setFunctionHook( 'coordinates', 
@@ -53,6 +59,7 @@
         * @param User $user
         * @param String $reason
         * @param int $id
+        * @return bool
         */
        public static function onArticleDeleteComplete( &$article, User &$user, 
$reason, $id ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -63,7 +70,9 @@
        /**
         * LinksUpdate hook handler
         * @see https://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdate
+        *
         * @param LinksUpdate $linksUpdate
+        * @return bool
         */
        public static function onLinksUpdate( &$linksUpdate ) {
                global $wgUseDumbLinkUpdate;

Modified: trunk/extensions/GeoData/api/ApiQueryAllPages_GeoData.php
===================================================================
--- trunk/extensions/GeoData/api/ApiQueryAllPages_GeoData.php   2012-04-04 
18:36:07 UTC (rev 114712)
+++ trunk/extensions/GeoData/api/ApiQueryAllPages_GeoData.php   2012-04-04 
18:37:47 UTC (rev 114713)
@@ -33,6 +33,8 @@
 
        /**
         * Only allow USE INDEX if not joining, otherwise it errors out
+        * @param string $name
+        * @param string|null $value
         */
        protected function addOption( $name, $value = null ) {
                if ( $name == 'USE INDEX' ) {

Modified: trunk/extensions/GeoData/api/ApiQueryCategoryMembers_GeoData.php
===================================================================
--- trunk/extensions/GeoData/api/ApiQueryCategoryMembers_GeoData.php    
2012-04-04 18:36:07 UTC (rev 114712)
+++ trunk/extensions/GeoData/api/ApiQueryCategoryMembers_GeoData.php    
2012-04-04 18:37:47 UTC (rev 114713)
@@ -33,6 +33,8 @@
 
        /**
         * Only allow USE INDEX if not joining, otherwise it errors out
+        * @param string $name
+        * @param string|null $value
         */
        protected function addOption( $name, $value = null ) {
                if ( $name == 'USE INDEX' ) {

Modified: trunk/extensions/GeoData/api/ApiQueryGeoSearch.php
===================================================================
--- trunk/extensions/GeoData/api/ApiQueryGeoSearch.php  2012-04-04 18:36:07 UTC 
(rev 114712)
+++ trunk/extensions/GeoData/api/ApiQueryGeoSearch.php  2012-04-04 18:37:47 UTC 
(rev 114713)
@@ -21,7 +21,6 @@
 
        /**
         * @param ApiPageSet $resultPageSet
-        * @return
         */
        private function run( $resultPageSet = null ) {
                $params = $this->extractRequestParams();
@@ -57,7 +56,6 @@
                $radius = intval( $params['radius'] );
                $rect = GeoMath::rectAround( $lat, $lon, $radius );
 
-               $dbr = wfGetDB( DB_SLAVE );
                $this->addTables( array( 'page', 'geo_tags' ) );
                $this->addFields( array( 'gt_lat', 'gt_lon', 'gt_primary' ) );
                // retrieve some fields only if page set needs them


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

Reply via email to