dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
e0b5e48
)
Merge "Linker: Use RequestContext::getMain()->getLanguage() instead of $wgLang"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Mon, 11 Mar 2019 18:30:56 +0000
(18:30 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Mon, 11 Mar 2019 18:30:56 +0000
(18:30 +0000)
includes/Linker.php
patch
|
blob
|
history
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
2c7f44c
..
3e50ac6
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-1607,9
+1607,8
@@
class Linker {
* @return string Full html of the TOC
*/
public static function tocList( $toc, $lang = null ) {
- global $wgLang;
- $lang = $lang ?? $wgLang;
- if ( !is_object( $lang ) ) {
+ $lang = $lang ?? RequestContext::getMain()->getLanguage();
+ if ( !$lang instanceof Language ) {
wfDeprecated( __METHOD__ . ' with type other than Language for $lang', '1.33' );
$lang = wfGetLangObj( $lang );
}