diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /extensions/Renameuser/Renameuser.hooks.php | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'extensions/Renameuser/Renameuser.hooks.php')
-rw-r--r-- | extensions/Renameuser/Renameuser.hooks.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extensions/Renameuser/Renameuser.hooks.php b/extensions/Renameuser/Renameuser.hooks.php index 846f9131..b344d99d 100644 --- a/extensions/Renameuser/Renameuser.hooks.php +++ b/extensions/Renameuser/Renameuser.hooks.php @@ -11,9 +11,12 @@ class RenameuserHooks { public static function onShowMissingArticle( $article ) { $title = $article->getTitle(); $oldUser = User::newFromName( $title->getBaseText() ); - if ( ($title->getNamespace() == NS_USER || $title->getNamespace() == NS_USER_TALK ) && ($oldUser && $oldUser->isAnon() )) { + if ( ( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK ) && + ( $oldUser && $oldUser->isAnon() ) + ) { // Get the title for the base userpage - $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) )->getPrefixedDBkey(); + $page = Title::makeTitle( NS_USER, str_replace( ' ', '_', $title->getBaseText() ) ) + ->getPrefixedDBkey(); $out = $article->getContext()->getOutput(); LogEventsList::showLogExtract( $out, @@ -51,6 +54,7 @@ class RenameuserHooks { array( 'oldusername' => $nt->getText() ) ); } + return true; } @@ -61,6 +65,7 @@ class RenameuserHooks { */ public static function onGetLogTypesOnUser( array &$types ) { $types[] = 'renameuser'; + return true; } } |