Make warnings for special page alias errors useful
authorAndrew Garrett <werdna@users.mediawiki.org>
Tue, 7 Jul 2009 14:27:58 +0000 (14:27 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Tue, 7 Jul 2009 14:27:58 +0000 (14:27 +0000)
docs/hooks.txt
includes/SpecialPage.php

index e2a745d..974c499 100644 (file)
@@ -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
index 4894926..29b4ded 100644 (file)
@@ -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";