summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryExternalLinks.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /includes/api/ApiQueryExternalLinks.php
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/api/ApiQueryExternalLinks.php')
-rw-r--r--includes/api/ApiQueryExternalLinks.php31
1 files changed, 6 insertions, 25 deletions
diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php
index 95666354..ec3d9d27 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -91,7 +91,7 @@ class ApiQueryExternalLinks extends ApiQueryBase {
if ( $params['expandurl'] ) {
$to = wfExpandUrl( $to, PROTO_CANONICAL );
}
- ApiResult::setContent( $entry, $to );
+ ApiResult::setContentValue( $entry, 'url', $to );
$fit = $this->addPageSubItem( $row->el_from, $entry );
if ( !$fit ) {
$this->setContinueEnumParameter( 'offset', $offset + $count - 1 );
@@ -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,30 +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 getDescription() {
- return 'Returns all external URLs (not interwikis) from the given page(s).';
- }
-
- 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',
);
}