From 55acc4e981d9ae6cc00ae48306ac6a78bce66085 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. --- FancyCaptcha.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FancyCaptcha.php b/FancyCaptcha.php index 14a63418d..3d300fc1d 100644 --- a/FancyCaptcha.php +++ b/FancyCaptcha.php @@ -37,6 +37,6 @@ $wgCaptchaDirectoryLevels = 0; // To break into subdirectories global $wgCaptchaSecret; $wgCaptchaSecret = "CHANGE_THIS_SECRET!"; -$dir = dirname(__FILE__) . '/'; -$wgExtensionMessagesFiles['FancyCaptcha'] = $dir . 'FancyCaptcha.i18n.php'; -$wgAutoloadClasses['FancyCaptcha'] = $dir . 'FancyCaptcha.class.php'; +$wgExtensionMessagesFiles['FancyCaptcha'] = dirname(__FILE__).'/FancyCaptcha.i18n.php'; +$wgAutoloadClasses['FancyCaptcha'] = dirname( __FILE__ ) . '/FancyCaptcha.class.php'; +