From 7f440c3f728d29ab3fd76b655862c14e0d219438 Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 28 Mar 2014 03:07:01 +0000 Subject: [PATCH] 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 --- CategoryTree.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CategoryTree.php b/CategoryTree.php index 7da350dc..c219d8df 100644 --- a/CategoryTree.php +++ b/CategoryTree.php @@ -116,10 +116,6 @@ $wgExtensionCredits['specialpage'][] = $wgExtensionCredits['parserhook'][] = arr */ $dir = dirname( __FILE__ ) . '/'; -if ( $wgUseAjax && $wgCategoryTreeAllowTag ) { - $wgExtensionMessagesFiles['CategoryTreeMagic'] = $dir . 'CategoryTree.i18n.magic.php'; -} - $wgMessagesDirs['CategoryTree'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php'; $wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php'; @@ -193,7 +189,9 @@ function efCategoryTree() { } if ( $wgCategoryTreeAllowTag ) { + global $wgExtensionMessagesFiles; $wgHooks['ParserFirstCallInit'][] = 'efCategoryTreeSetHooks'; + $wgExtensionMessagesFiles['CategoryTreeMagic'] = $dir . 'CategoryTree.i18n.magic.php'; } if ( !isset( $wgCategoryTreeDefaultOptions['mode'] ) || is_null( $wgCategoryTreeDefaultOptions['mode'] ) ) {