From 717af5aaea2cb81d13568fd2cc315d795caf4768 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 7 Jul 2009 14:27:58 +0000 Subject: [PATCH] Make warnings for special page alias errors useful --- docs/hooks.txt | 4 ++++ includes/SpecialPage.php | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index e2a745d218..974c499a67 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1534,7 +1534,11 @@ $template: SimpleTemplate instance for the form 'UserLoginMailPassword': Block users from emailing passwords $name: the username to email the password of. +<<<<<<< .mine +&$error: out-param – the error message to return. +======= &$error: out-param - the error message to return. +>>>>>>> .r52831 'UserLogout': before a user logs out $user: the user object that is about to be logged out diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 489492627f..29b4ded9ce 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -602,13 +602,15 @@ class SpecialPage { $found = false; foreach ( $aliases as $n => $values ) { if ( strcasecmp( $name, $n ) === 0 ) { - wfWarn( "Found $n for $name with casefix" ); + wfWarn( "Found alias defined for $n when searching for special page aliases +for $name. Case mismatch?" ); $name = $values[0]; $found = true; break; } } - if ( !$found ) wfWarn( "Did not find name for special page $name" ); + if ( !$found ) wfWarn( "Did not find alias for special page '$name'. +Perhaps no page aliases are defined for it?" ); } if ( $subpage !== false && !is_null( $subpage ) ) { $name = "$name/$subpage"; -- 2.20.1