diff options
Diffstat (limited to 'extensions/Renameuser/RenameuserLogFormatter.php')
-rw-r--r-- | extensions/Renameuser/RenameuserLogFormatter.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extensions/Renameuser/RenameuserLogFormatter.php b/extensions/Renameuser/RenameuserLogFormatter.php index c7c4678d..37078842 100644 --- a/extensions/Renameuser/RenameuserLogFormatter.php +++ b/extensions/Renameuser/RenameuserLogFormatter.php @@ -68,4 +68,25 @@ class RenameuserLogFormatter extends LogFormatter { return $key; } + + public function getPreloadTitles() { + $params = $this->extractParameters(); + if ( !isset( $params[3] ) ) { + // Very old log format, everything in comment - legaciest + return array(); + } + if ( !isset( $params[4] ) ) { + // Old log format - legacier + $newUserName = $params[3]; + } else { + $newUserName = $params[4]; + } + + $title = Title::makeTitleSafe( NS_USER, $newUserName ); + if ( $title ) { + return array( $title ); + } + + return array(); + } } |