Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/177285

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Babel 
refs/changes/85/177285/1

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: newchange
Gerrit-Change-Id: Ia1a33df6e022967c75b559b0774dcd83546736d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Babel
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to