Move $wgExtensionMessagesFiles['CategoryTreeMagic'] into $wgExtensionFunctions

Extension config based on values of config values isn't going to work
in the global scope. The user won't have set it yet.

Though, is there any reason we don't just loads this always?

Change-Id: I32357244c013a2370f14ff5d36427aa3385be444
This commit is contained in:
Reedy 2014-03-28 03:07:01 +00:00
parent 825bd06c4c
commit 7f440c3f72

View file

@ -116,10 +116,6 @@ $wgExtensionCredits['specialpage'][] = $wgExtensionCredits['parserhook'][] = arr
*/ */
$dir = dirname( __FILE__ ) . '/'; $dir = dirname( __FILE__ ) . '/';
if ( $wgUseAjax && $wgCategoryTreeAllowTag ) {
$wgExtensionMessagesFiles['CategoryTreeMagic'] = $dir . 'CategoryTree.i18n.magic.php';
}
$wgMessagesDirs['CategoryTree'] = __DIR__ . '/i18n'; $wgMessagesDirs['CategoryTree'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php'; $wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php';
$wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php'; $wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php';
@ -193,7 +189,9 @@ function efCategoryTree() {
} }
if ( $wgCategoryTreeAllowTag ) { if ( $wgCategoryTreeAllowTag ) {
global $wgExtensionMessagesFiles;
$wgHooks['ParserFirstCallInit'][] = 'efCategoryTreeSetHooks'; $wgHooks['ParserFirstCallInit'][] = 'efCategoryTreeSetHooks';
$wgExtensionMessagesFiles['CategoryTreeMagic'] = $dir . 'CategoryTree.i18n.magic.php';
} }
if ( !isset( $wgCategoryTreeDefaultOptions['mode'] ) || is_null( $wgCategoryTreeDefaultOptions['mode'] ) ) { if ( !isset( $wgCategoryTreeDefaultOptions['mode'] ) || is_null( $wgCategoryTreeDefaultOptions['mode'] ) ) {