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

Change subject: Don't set a global $dir variable
......................................................................


Don't set a global $dir variable

Change-Id: Ia1a33df6e022967c75b559b0774dcd83546736d9
---
M Babel.php
1 file changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/Babel.php b/Babel.php
index ef002ec..da5646e 100644
--- a/Babel.php
+++ b/Babel.php
@@ -31,16 +31,14 @@
 $GLOBALS['wgHooks']['ParserFirstCallInit'][] = 
'BabelStatic::onParserFirstCallInit';
 $GLOBALS['wgHooks']['AbortNewAccount'][] = 
'BabelAutoCreate::onAbortNewAccount';
 
-$dir = __DIR__ . '/';
-
 $GLOBALS['wgMessagesDirs']['Babel'] = __DIR__ . '/i18n';
-$GLOBALS['wgExtensionMessagesFiles']['Babel'] = $dir . 'Babel.i18n.php';
-$GLOBALS['wgExtensionMessagesFiles']['BabelMagic'] = $dir . 
'Babel.i18n.magic.php';
+$GLOBALS['wgExtensionMessagesFiles']['Babel'] = __DIR__ . '/Babel.i18n.php';
+$GLOBALS['wgExtensionMessagesFiles']['BabelMagic'] = __DIR__ . 
'/Babel.i18n.magic.php';
 
-$GLOBALS['wgAutoloadClasses']['Babel'] = $dir . 'Babel.class.php';
-$GLOBALS['wgAutoloadClasses']['BabelLanguageCodes'] = $dir . 
'BabelLanguageCodes.class.php';
-$GLOBALS['wgAutoloadClasses']['BabelStatic'] = $dir . 'BabelStatic.class.php';
-$GLOBALS['wgAutoloadClasses']['BabelAutoCreate'] = $dir . 
'BabelAutoCreate.class.php';
+$GLOBALS['wgAutoloadClasses']['Babel'] = __DIR__ . '/Babel.class.php';
+$GLOBALS['wgAutoloadClasses']['BabelLanguageCodes'] = __DIR__ . 
'/BabelLanguageCodes.class.php';
+$GLOBALS['wgAutoloadClasses']['BabelStatic'] = __DIR__ . 
'/BabelStatic.class.php';
+$GLOBALS['wgAutoloadClasses']['BabelAutoCreate'] = __DIR__ . 
'/BabelAutoCreate.class.php';
 
 $GLOBALS['wgResourceModules']['ext.babel'] = array(
        'styles' => 'resources/ext.babel.css',
@@ -50,8 +48,8 @@
 
 // Configuration setttings.
 // Language names and codes constant database files, the defaults should 
suffice.
-$GLOBALS['wgBabelLanguageCodesCdb'] = $dir . 'codes.cdb';
-$GLOBALS['wgBabelLanguageNamesCdb'] = $dir . 'names.cdb';
+$GLOBALS['wgBabelLanguageCodesCdb'] = __DIR__ . '/codes.cdb';
+$GLOBALS['wgBabelLanguageNamesCdb'] = __DIR__ . '/names.cdb';
 // Array of possible levels, and their category name - variables: %code% 
%wikiname% %nativename%
 // Set to false to disable categories for a particular level.
 // Alphabetical levels should be in upper case.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1a33df6e022967c75b559b0774dcd83546736d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Babel
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to