Go to the documentation of this file.
35 parent::__construct(
$query, $moduleName,
'll' );
39 if ( $this->
getPageSet()->getGoodTitleCount() == 0 ) {
53 $prop =
array(
'url' => 1 );
64 if ( !is_null(
$params[
'continue'] ) ) {
65 $cont = explode(
'|',
$params[
'continue'] );
67 $op =
$params[
'dir'] ==
'descending' ?
'<' :
'>';
68 $llfrom = intval( $cont[0] );
69 $lllang = $this->
getDB()->addQuotes( $cont[1] );
71 "ll_from $op $llfrom OR " .
72 "(ll_from = $llfrom AND " .
73 "ll_lang $op= $lllang)"
83 $sort = ( $params[
'dir'] ==
'descending' ?
' DESC' :
'' );
84 if ( isset(
$params[
'lang'] ) ) {
86 if ( isset(
$params[
'title'] ) ) {
92 if ( count( $this->
getPageSet()->getGoodTitles() ) == 1 ) {
102 $this->
addOption(
'LIMIT', $params[
'limit'] + 1 );
106 foreach (
$res as $row ) {
113 $entry =
array(
'lang' => $row->ll_lang );
114 if ( isset( $prop[
'url'] ) ) {
120 if ( isset( $prop[
'langname'] ) ) {
123 if ( isset( $prop[
'autonym'] ) ) {
171 'inlanguagecode' => $wgContLang->getCode(),
177 'limit' =>
'How many langlinks to return',
178 'continue' =>
'When more results are available, use this to continue',
179 'url' =>
"Whether to get the full URL (Cannot be used with {$this->getModulePrefix()}prop)",
181 'Which additional properties to get for each interlanguage link',
182 ' url - Adds the full URL',
183 ' langname - Adds the localised language name (best effort, use CLDR extension)',
184 " Use {$this->getModulePrefix()}inlanguagecode to control the language",
185 ' autonym - Adds the native language name',
187 'lang' =>
'Language code',
188 'title' =>
"Link to search for. Must be used with {$this->getModulePrefix()}lang",
189 'dir' =>
'The direction in which to list',
190 'inlanguagecode' =>
'Language code for localised language names',
216 return 'Returns all interlanguage links from the given page(s).';
220 return array_merge( parent::getPossibleErrors(),
222 array(
'url',
'prop' )
225 array(
'missingparam',
'lang' ),
232 'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects='
233 =>
'Get interlanguage links from the [[Main Page]]',
238 return 'https://www.mediawiki.org/wiki/API:Properties#langlinks_.2F_ll';
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
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.
A query module to list all langlinks (links to corresponding foreign language pages).
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
getParamDescription()
Returns an array of parameter descriptions.
getCacheMode( $params)
Get the cache mode for the data generated by this module.
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.
when a variable name is used in a it is silently declared as a new masking the global
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.
__construct( $query, $moduleName)
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
addWhereFld( $field, $value)
Equivalent to addWhere(array($field => $value))
static fetchLanguageName( $code, $inLanguage=null, $include='all')
getPageSet()
Get the PageSet object to work on.
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
getDescription()
Returns the description string for this module.
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.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
getRequireMaxOneParameterErrorMessages( $params)
Generates the possible error requireMaxOneParameter() can die with.
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
requireMaxOneParameter( $params)
Die if more than one of a certain set of parameters is set and not false.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
addPageSubItem( $pageId, $item, $elemname=null)
Same as addPageSubItems(), but one element of $data at a time.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
getExamples()
Returns usage examples for this module.