summaryrefslogtreecommitdiff
path: root/extensions/LocalisationUpdate/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/LocalisationUpdate/update.php')
-rw-r--r--extensions/LocalisationUpdate/update.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/extensions/LocalisationUpdate/update.php b/extensions/LocalisationUpdate/update.php
index 1f66e736..1f5eaa77 100644
--- a/extensions/LocalisationUpdate/update.php
+++ b/extensions/LocalisationUpdate/update.php
@@ -10,7 +10,7 @@ require "$IP/maintenance/Maintenance.php";
class LU extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = 'Fetches translation updates to MediaWiki and extensions.';
+ $this->mDescription = 'Fetches translation updates to MediaWiki core, skins and extensions.';
$this->addOption(
'repoid',
'Fetch translations from repositories identified by this',
@@ -25,7 +25,7 @@ class LU extends Maintenance {
ini_set( "max_execution_time", 0 );
ini_set( 'memory_limit', -1 );
- global $wgExtensionMessagesFiles, $wgMessagesDirs, $IP;
+ global $wgExtensionMessagesFiles, $IP;
global $wgLocalisationUpdateRepositories;
global $wgLocalisationUpdateRepository;
@@ -35,7 +35,15 @@ class LU extends Maintenance {
return;
}
- $finder = new LU_Finder( $wgExtensionMessagesFiles, $wgMessagesDirs, $IP );
+ $lc = Language::getLocalisationCache();
+ if ( is_callable( array( $lc, 'getMessagesDirs' ) ) ) { // Introduced in 1.25
+ $messagesDirs = $lc->getMessagesDirs();
+ } else {
+ global $wgMessagesDirs;
+ $messagesDirs = $wgMessagesDirs;
+ }
+
+ $finder = new LU_Finder( $wgExtensionMessagesFiles, $messagesDirs, $IP );
$readerFactory = new LU_ReaderFactory();
$fetcherFactory = new LU_FetcherFactory();