$this->addOption( 'ORDER BY', array(
'll_title' . $sort,
'll_from' . $sort
- ));
+ ) );
}
} else {
$this->addOption( 'ORDER BY', array(
'll_lang' . $sort,
'll_title' . $sort,
'll_from' . $sort
- ));
+ ) );
}
$this->addOption( 'LIMIT', $params['limit'] + 1 );
$count = 0;
$result = $this->getResult();
foreach ( $res as $row ) {
- if ( ++ $count > $params['limit'] ) {
- // We've reached the one extra which shows that there are additional pages to be had. Stop here...
- // Continue string preserved in case the redirect query doesn't pass the limit
- $this->setContinueEnumParameter( 'continue', "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}" );
+ if ( ++$count > $params['limit'] ) {
+ // We've reached the one extra which shows that there are
+ // additional pages to be had. Stop here... Continue string
+ // preserved in case the redirect query doesn't pass the limit.
+ $this->setContinueEnumParameter(
+ 'continue',
+ "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}"
+ );
break;
}
$fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
if ( !$fit ) {
- $this->setContinueEnumParameter( 'continue', "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}" );
+ $this->setContinueEnumParameter(
+ 'continue',
+ "{$row->ll_lang}|{$row->ll_title}|{$row->ll_from}"
+ );
break;
}
}
'prop' => array(
'Which properties to get',
' lllang - Adds the language code of the language link',
- ' lltitle - Adds the title of the language ink',
+ ' lltitle - Adds the title of the language link',
),
'limit' => 'How many total pages to return',
'dir' => 'The direction in which to list',
'api.php?action=query&generator=langbacklinks&glbltitle=Test&glbllang=fr&prop=info'
);
}
+
+ public function getHelpUrls() {
+ return 'https://www.mediawiki.org/wiki/API:Langbacklinks';
+ }
}