dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resources: Register CLDRPluralRuleParser as foreign resource
[lhc/web/wiklou.git]
/
maintenance
/
convertLinks.php
diff --git
a/maintenance/convertLinks.php
b/maintenance/convertLinks.php
index
54c0eda
..
af60eaa
100644
(file)
--- a/
maintenance/convertLinks.php
+++ b/
maintenance/convertLinks.php
@@
-21,6
+21,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-75,8
+77,6
@@
class ConvertLinks extends Maintenance {
return;
}
return;
}
- global $wgContLang;
-
# counters etc
$numBadLinks = $curRowsRead = 0;
# 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 ) {
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++;
}
$ids[$title] = $row->cur_id;
$curRowsRead++;
@@
-302,5
+303,5
@@
class ConvertLinks extends Maintenance {
}
}
}
}
-$maintClass =
"ConvertLinks"
;
+$maintClass =
ConvertLinks::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;