From 41afc38c73aa286aef929ac7e6a00ae5294fab06 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Sun, 30 Nov 2008 03:15:22 +0000 Subject: [PATCH] Revert "Follow up on r43982. Reduce dirname(__FILE__) calls in core and extensions." Uses $dir in extension files, and assumes that it remains unchanged in require_once( 'maintenance/commandLine.inc' ). In fact, it is likely that '$dir' will be set when setting up command-line, as some extensions will use the same var. Recommended fix: Use $CentralAuth_dir, $EmailPage_dir, etc. --- CategoryTree.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CategoryTree.php b/CategoryTree.php index d5caedf3..59899fe5 100644 --- a/CategoryTree.php +++ b/CategoryTree.php @@ -102,6 +102,8 @@ $wgCategoryTreePageCategoryOptions['namespaces'] = false; $wgCategoryTreePageCategoryOptions['depth'] = 0; #$wgCategoryTreePageCategoryOptions['class'] = 'CategoryTreeInlineNode'; +$wgExtensionAliasesFiles['CategoryTree'] = dirname(__FILE__) . '/CategoryTreePage.i18n.alias.php'; + /** * Register extension setup hook and credits */ @@ -129,7 +131,6 @@ $wgExtensionCredits['parserhook'][] = array( * Register the special page */ $dir = dirname(__FILE__) . '/'; -$wgExtensionAliasesFiles['CategoryTree'] = $dir . 'CategoryTreePage.i18n.alias.php'; $wgExtensionMessagesFiles['CategoryTree'] = $dir . 'CategoryTree.i18n.php'; $wgAutoloadClasses['CategoryTreePage'] = $dir . 'CategoryTreePage.php'; $wgAutoloadClasses['CategoryTree'] = $dir . 'CategoryTreeFunctions.php';