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.
This commit is contained in:
Andrew Garrett 2008-11-30 03:15:22 +00:00
parent afebaee200
commit 41afc38c73

View file

@ -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';