* Unknown log types no longer throw notices everywhere in RecentChanges
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 14 Feb 2006 21:24:48 +0000 (21:24 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 14 Feb 2006 21:24:48 +0000 (21:24 +0000)
This has been driving me nuts when disabling extensions with custom log types.

RELEASE-NOTES
includes/LogPage.php

index c98fd12..8f9e6f8 100644 (file)
@@ -613,6 +613,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Allow cookies to be shared between multiple wikis with a shared user database
 * Blocking some Unicode whitespace characters in usernames. Should check
   if some or all should be blocked from all page titles.
+* Unknown log types no longer throw notices everywhere in RecentChanges
 
 
 === Caveats ===
index 825e703..c44991c 100644 (file)
@@ -120,7 +120,12 @@ class LogPage {
                );
                wfRunHooks( 'LogPageLogName', array( &$typeText ) );
 
-               return str_replace( '_', ' ', wfMsg( $typeText[$type] ) );
+               if( isset( $typeText[$type] ) ) {
+                       return str_replace( '_', ' ', wfMsg( $typeText[$type] ) );
+               } else {
+                       // Bogus log types? Perhaps an extension was removed.
+                       return $type;
+               }
        }
 
        /**