jenkins-bot has submitted this change and it was merged.

Change subject: Use LocalisationCache::getMessagesDirs()
......................................................................


Use LocalisationCache::getMessagesDirs()

Depends on I2399ddd7fd in mediawiki/core which makes the method
public.

Change-Id: Ic8fb0b2ab127c20518a055c0b4f8bc28980c9123
---
M update.php
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/update.php b/update.php
index 1f66e73..bb94980 100644
--- a/update.php
+++ b/update.php
@@ -25,7 +25,7 @@
                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 @@
                        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();
 

-- 
To view, visit https://gerrit.wikimedia.org/r/177500
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8fb0b2ab127c20518a055c0b4f8bc28980c9123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LocalisationUpdate
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to