r10951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10950‎ | r10951 | r10952 >
Date:13:48, 8 September 2005
Author:avar
Status:old
Tags:
Comment:
* New style for msg:newuserloglog
* Some code refactoring
Modified paths:
  • /trunk/extensions/Newuserlog/Newuserlog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Newuserlog/Newuserlog.php
@@ -21,13 +21,11 @@
2222 function wfNewuserlog() {
2323 global $wgMessageCache, $wgHooks, $wgContLang;
2424
25 - $talk = $wgContLang->getFormattedNsText( NS_TALK );
26 -
2725 $wgMessageCache->addMessages(
2826 array(
2927 'newuserlogpage' => 'User creation log',
3028 'newuserlogpagetext' => 'This is a log of recent user creations',
31 - 'newuserloglog' => 'Created the user "[[User:$1|$1]]" ([[User talk:$1|' . $talk . ']]; [[Special:Contributions/$1|Contributions]])'
 29+ 'newuserloglog' => "Created the user [[User:$1|$1]] ([[User talk:$1|$2]] | [[Special:Contributions/$1|$3]])"
3230 )
3331 );
3432
@@ -41,10 +39,13 @@
4240 }
4341
4442 function wfNewuserlogHook() {
45 - global $wgUser, $wgTitle;
 43+ global $wgUser, $wgTitle, $wgContLang;
 44+
 45+ $talk = $wgContLang->getFormattedNsText( NS_TALK );
 46+ $contribs = wfMsgForContent( 'contribslink' );
4647
4748 $log = new LogPage( 'newusers' );
48 - $log->addEntry( 'newusers', $wgTitle, wfMsg( 'newuserloglog', $wgUser->getName() ) );
 49+ $log->addEntry( 'newusers', $wgTitle, wfMsgForContent( 'newuserloglog', $wgUser->getName(), $talk, $contribs ) );
4950
5051 return true;
5152 }

Status & tagging log