X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiQueryExternalLinks.php;h=6ddb6c85e6177ad7569f2d862ce596d9cb6d966d;hb=c35284ce8069db6a4bf4813cf86b452d3186435e;hp=e3a7be3da702e4160a7566bdc8fe74fd2576b397;hpb=d74a185fd315a75b41c9f2a8832ac70437de0e37;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php index e3a7be3da7..6ddb6c85e6 100644 --- a/includes/api/ApiQueryExternalLinks.php +++ b/includes/api/ApiQueryExternalLinks.php @@ -114,7 +114,8 @@ class ApiQueryExternalLinks extends ApiQueryBase { ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 ), 'offset' => array( - ApiBase::PARAM_TYPE => 'integer' + ApiBase::PARAM_TYPE => 'integer', + ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', ), 'protocol' => array( ApiBase::PARAM_TYPE => ApiQueryExtLinksUsage::prepareProtocols(), @@ -125,44 +126,10 @@ class ApiQueryExternalLinks extends ApiQueryBase { ); } - public function getParamDescription() { - $p = $this->getModulePrefix(); - - return array( - 'limit' => 'How many links to return', - 'offset' => 'When more results are available, use this to continue', - 'protocol' => array( - "Protocol of the URL. If empty and {$p}query set, the protocol is http.", - "Leave both this and {$p}query empty to list all external links" - ), - 'query' => 'Search string without protocol. Useful for checking ' . - 'whether a certain page contains a certain external url', - 'expandurl' => 'Expand protocol-relative URLs with the canonical protocol', - ); - } - - public function getResultProperties() { - return array( - '' => array( - '*' => 'string' - ) - ); - } - - public function getDescription() { - return 'Returns all external URLs (not interwikis) from the given page(s).'; - } - - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'code' => 'bad_query', 'info' => 'Invalid query' ), - ) ); - } - - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=query&prop=extlinks&titles=Main%20Page' - => 'Get a list of external links on the [[Main Page]]', + 'action=query&prop=extlinks&titles=Main%20Page' + => 'apihelp-query+extlinks-example-simple', ); }