Followup r92396, add help urls for most of the core (non query) modules
authorSam Reed <reedy@users.mediawiki.org>
Sun, 17 Jul 2011 16:38:24 +0000 (16:38 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 17 Jul 2011 16:38:24 +0000 (16:38 +0000)
23 files changed:
includes/api/ApiBlock.php
includes/api/ApiDelete.php
includes/api/ApiEditPage.php
includes/api/ApiEmailUser.php
includes/api/ApiExpandTemplates.php
includes/api/ApiFeedContributions.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiFileRevert.php
includes/api/ApiFormatBase.php
includes/api/ApiHelp.php
includes/api/ApiImport.php
includes/api/ApiMove.php
includes/api/ApiOpenSearch.php
includes/api/ApiParse.php
includes/api/ApiPatrol.php
includes/api/ApiProtect.php
includes/api/ApiPurge.php
includes/api/ApiRollback.php
includes/api/ApiUnblock.php
includes/api/ApiUndelete.php
includes/api/ApiUpload.php
includes/api/ApiUserrights.php
includes/api/ApiWatch.php

index 94a8546..d3df264 100644 (file)
@@ -215,6 +215,10 @@ class ApiBlock extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Block';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 979e8e1..ace1177 100644 (file)
@@ -276,6 +276,10 @@ class ApiDelete extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Delete';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index dbfcc3d..27cecf1 100644 (file)
@@ -524,6 +524,10 @@ class ApiEditPage extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Edit';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 55188b9..c6c0701 100644 (file)
@@ -144,6 +144,10 @@ class ApiEmailUser extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:E-mail';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index dd35aaa..8b3ca15 100644 (file)
@@ -115,6 +115,10 @@ class ApiExpandTemplates extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Parsing_wikitext';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index ef6fecc..a9846a5 100644 (file)
@@ -201,6 +201,10 @@ class ApiFeedContributions extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return '';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 5e83b30..b4fb9e4 100644 (file)
@@ -221,6 +221,10 @@ class ApiFeedWatchlist extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Watchlist_feed';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 371ef67..6f2916a 100644 (file)
@@ -55,20 +55,20 @@ class ApiFileRevert extends ApiBase {
 
                // Check whether we're allowed to revert this file
                $this->checkPermissions( $wgUser );
-               
+
                $sourceUrl = $this->file->getArchiveVirtualUrl( $this->archiveName );
                $status = $this->file->upload( $sourceUrl, $this->params['comment'], $this->params['comment'] );
 
                if ( $status->isGood() ) {
                        $result = array( 'result' => 'Success' );
                } else {
-                       $result = array( 
-                               'result' => 'Failure', 
+                       $result = array(
+                               'result' => 'Failure',
                                'errors' => $this->getResult()->convertStatusToArray( $status ),
                        );
                }
 
-               $this->getResult()->addValue( null, $this->getModuleName(), $result );  
+               $this->getResult()->addValue( null, $this->getModuleName(), $result );
 
        }
 
@@ -131,7 +131,7 @@ class ApiFileRevert extends ApiBase {
                        ),
                        'archivename' => array(
                                ApiBase::PARAM_TYPE => 'string',
-                               ApiBase::PARAM_REQUIRED => true,                        
+                               ApiBase::PARAM_REQUIRED => true,
                        ),
                        'token' => null,
                );
@@ -183,6 +183,10 @@ class ApiFileRevert extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return '';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index cddfb4a..f491144 100644 (file)
@@ -294,6 +294,10 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
                return 'api.php?action=query&meta=siteinfo&siprop=namespaces&format=' . $this->getModuleName();
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Data_formats';
+       }
+
        public function getDescription() {
                return $this->getIsHtml() ? ' (pretty-print in HTML)' : '';
        }
index c5170c4..89dbf10 100644 (file)
@@ -154,6 +154,14 @@ class ApiHelp extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return array(
+                       'http://www.mediawiki.org/wiki/API:Main_page',
+                       'http://www.mediawiki.org/wiki/API:FAQ',
+                       'http://www.mediawiki.org/wiki/API:Quick_start_guide',
+               );
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 12cf08f..1b77266 100644 (file)
@@ -165,6 +165,10 @@ class ApiImport extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Import';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 6fefc6a..7f9d62b 100644 (file)
@@ -260,6 +260,10 @@ class ApiMove extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Move';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index bdab14f..9a09c27 100644 (file)
@@ -60,7 +60,7 @@ class ApiOpenSearch extends ApiBase {
 
                        $searches = PrefixSearch::titleSearch( $search, $limit,
                                $namespaces );
-                       
+
                        // if the content language has variants, try to retrieve fallback results
                        $fallbackLimit = $limit - count( $searches );
                        if ( $fallbackLimit > 0 ) {
@@ -125,6 +125,10 @@ class ApiOpenSearch extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return '';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 9d2d95a..60b1714 100644 (file)
@@ -585,6 +585,10 @@ class ApiParse extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return '';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 58e0499..c3dc582 100644 (file)
@@ -110,6 +110,10 @@ class ApiPatrol extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return '';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 021c687..c87cf43 100644 (file)
@@ -224,6 +224,10 @@ class ApiProtect extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Protect';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index aa69536..bf8acd1 100644 (file)
@@ -142,6 +142,10 @@ class ApiPurge extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Purge';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index e845df6..4ad84a8 100644 (file)
@@ -191,6 +191,10 @@ class ApiRollback extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Rollback';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 6865787..096641a 100644 (file)
@@ -148,6 +148,10 @@ class ApiUnblock extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Block';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 509c1f8..3e3157d 100644 (file)
@@ -159,6 +159,10 @@ class ApiUndelete extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Undelete';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index b101ecc..7c95f99 100644 (file)
@@ -58,7 +58,7 @@ class ApiUpload extends ApiBase {
                $request = $this->getMain()->getRequest();
                // Add the uploaded file to the params array
                $this->mParams['file'] = $request->getFileName( 'file' );
-               
+
                // Copy the session key to the file key, for backward compatibility.
                if( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
                        $this->mParams['filekey'] = $this->mParams['sessionkey'];
@@ -562,6 +562,10 @@ class ApiUpload extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Upload';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 60853a1..a0a52b0 100644 (file)
@@ -139,6 +139,10 @@ class ApiUserrights extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:User_group_membership';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
index 241e25d..e3bd57f 100644 (file)
@@ -125,6 +125,10 @@ class ApiWatch extends ApiBase {
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Watch';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }