X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FconvertLinks.php;h=af60eaa2ba81621c2f4a32b2b5776058e1c6d1c0;hb=9e5edca6c55bc386f899722cc50a62d669a1314b;hp=8cd029762ffcd435b63e465be9d20b6d77e9aaed;hpb=577f3d79115173f4dd16bb46f6d0ef2c82b55add;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php index 8cd029762f..af60eaa2ba 100644 --- a/maintenance/convertLinks.php +++ b/maintenance/convertLinks.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -75,8 +77,6 @@ class ConvertLinks extends Maintenance { return; } - global $wgContLang; - # counters etc $numBadLinks = $curRowsRead = 0; @@ -153,7 +153,8 @@ class ConvertLinks extends Maintenance { foreach ( $res as $row ) { $title = $row->cur_title; if ( $row->cur_namespace ) { - $title = $wgContLang->getNsText( $row->cur_namespace ) . ":$title"; + $title = MediaWikiServices::getInstance()->getContentLanguage()-> + getNsText( $row->cur_namespace ) . ":$title"; } $ids[$title] = $row->cur_id; $curRowsRead++;