Go to the documentation of this file.
36 parent::__construct(
$query, $moduleName,
'iw' );
40 if ( $this->
getPageSet()->getGoodTitleCount() == 0 ) {
59 if ( !is_null(
$params[
'continue'] ) ) {
60 $cont = explode(
'|',
$params[
'continue'] );
62 $op =
$params[
'dir'] ==
'descending' ?
'<' :
'>';
64 $iwlfrom = intval( $cont[0] );
65 $iwlprefix = $db->addQuotes( $cont[1] );
66 $iwltitle = $db->addQuotes( $cont[2] );
68 "iwl_from $op $iwlfrom OR " .
69 "(iwl_from = $iwlfrom AND " .
70 "(iwl_prefix $op $iwlprefix OR " .
71 "(iwl_prefix = $iwlprefix AND " .
72 "iwl_title $op= $iwltitle)))"
76 $sort = (
$params[
'dir'] ==
'descending' ?
' DESC' :
'' );
77 if ( isset(
$params[
'prefix'] ) ) {
79 if ( isset(
$params[
'title'] ) ) {
90 if ( count( $this->
getPageSet()->getGoodTitles() ) == 1 ) {
105 foreach (
$res as $row ) {
111 "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}"
115 $entry =
array(
'prefix' => $row->iwl_prefix );
129 "{$row->iwl_from}|{$row->iwl_prefix}|{$row->iwl_title}"
165 'url' =>
'Whether to get the full URL',
166 'limit' =>
'How many interwiki links to return',
167 'continue' =>
'When more results are available, use this to continue',
168 'prefix' =>
'Prefix for the interwiki',
169 'title' =>
"Interwiki link to search for. Must be used with {$this->getModulePrefix()}prefix",
170 'dir' =>
'The direction in which to list',
177 'prefix' =>
'string',
188 return 'Returns all interwiki links from the given page(s).';
192 return array_merge( parent::getPossibleErrors(),
array(
193 array(
'missingparam',
'prefix' ),
199 'api.php?action=query&prop=iwlinks&titles=Main%20Page'
200 =>
'Get interwiki links from the [[Main Page]]',
205 return 'https://www.mediawiki.org/wiki/API:Iwlinks';
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
addFields( $value)
Add a set of fields to select to the internal array.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getCacheMode( $params)
Get the cache mode for the data generated by this module.
static setContent(&$arr, $value, $subElemName=null)
Adds a content element to an array.
dieUsageMsg( $error)
Output the error message related to a certain array.
select( $method, $extraQuery=array())
Execute a SELECT query based on the values in the internal arrays.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
getDescription()
Returns the description string for this module.
A query module to list all interwiki links on a page.
This is a base class for all Query modules.
getDB()
Get the Query database connection (read-only)
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
presenting them properly to the user as errors is done by the caller $title
dieContinueUsageIf( $condition)
Die with the $prefix.
addWhereFld( $field, $value)
Equivalent to addWhere(array($field => $value))
getPageSet()
Get the PageSet object to work on.
__construct( $query, $moduleName)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
addWhere( $value)
Add a set of WHERE clauses to the internal array.
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
getExamples()
Returns usage examples for this module.
addPageSubItem( $pageId, $item, $elemname=null)
Same as addPageSubItems(), but one element of $data at a time.
getParamDescription()
Returns an array of parameter descriptions.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.