<?php
/**
- *
- *
- * Created on May 13, 2007
- *
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* A query module to list all langlinks (links to corresponding foreign language pages).
*
$cont = explode( '|', $params['continue'] );
$this->dieContinueUsageIf( count( $cont ) != 2 );
$op = $params['dir'] == 'descending' ? '<' : '>';
- $llfrom = intval( $cont[0] );
+ $llfrom = (int)$cont[0];
$lllang = $this->getDB()->addQuotes( $cont[1] );
$this->addWhere(
"ll_from $op $llfrom OR " .
}
public function getAllowedParams() {
- global $wgContLang;
return [
'prop' => [
ApiBase::PARAM_ISMULTI => true,
'descending'
]
],
- 'inlanguagecode' => $wgContLang->getCode(),
+ 'inlanguagecode' => MediaWikiServices::getInstance()->getContentLanguage()->getCode(),
'limit' => [
ApiBase::PARAM_DFLT => 10,
ApiBase::PARAM_TYPE => 'limit',