Index: trunk/extensions/NewUserMessage/NewUserMessage.php |
— | — | @@ -12,9 +12,9 @@ |
13 | 13 | if (!defined('MEDIAWIKI')) |
14 | 14 | die('Not an entry point.'); |
15 | 15 | |
16 | | -define('NEWUSERMESSAGE_VERSION','2.0, 2008-06-04'); |
| 16 | +define('NEWUSERMESSAGE_VERSION','2.1, 2009-01-07'); |
17 | 17 | |
18 | | -$wgNewUserSuppressRC = false; // Specify whether or not the new user message creation should show up in recent changes |
| 18 | +$wgNewUserSuppressRC = false; // Specify whether or not the new user message creation should show up in recent changes |
19 | 19 | $wgNewUserMinorEdit = true; // Should the new user message creation be a minor edit? |
20 | 20 | $wgNewUserMessageOnAutoCreate = false; // Should auto creation (CentralAuth) trigger a new user message? |
21 | 21 | |
Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php |
— | — | @@ -17,17 +17,18 @@ |
18 | 18 | * Add the template message if the users talk page doesn't already exist |
19 | 19 | */ |
20 | 20 | static function createNewUserMessage($user) { |
21 | | - $name = $user->getName(); |
22 | | - $talk = $user->getTalkPage(); |
23 | | - |
24 | 21 | if (!$talk->exists()) { |
25 | 22 | global $wgUser, $wgNewUserMinorEdit, $wgNewUserSuppressRC; |
26 | 23 | |
| 24 | + $name = $user->getName(); |
| 25 | + $realName = $user->getRealName(); |
| 26 | + $talk = $user->getTalkPage(); |
| 27 | + |
27 | 28 | wfLoadExtensionMessages( 'NewUserMessage' ); |
28 | 29 | |
29 | 30 | $article = new Article($talk); |
30 | 31 | |
31 | | - // Create a user object for the editing user and add it to the database |
| 32 | + // Create a user object for the editing user and add it to the database |
32 | 33 | // if it's not there already |
33 | 34 | $editor = User::newFromName( wfMsgForContent( 'newusermessage-editor' ) ); |
34 | 35 | if ( !$editor->isLoggedIn() ) { |
— | — | @@ -51,7 +52,7 @@ |
52 | 53 | $dbw->begin(); |
53 | 54 | $good = true; |
54 | 55 | |
55 | | - $text = "{{{$templateTitleText}|$name}}"; |
| 56 | + $text = "{{{$templateTitleText}|$name|$realName}}"; |
56 | 57 | $signatures = wfMsgForContent( 'newusermessage-signatures' ); |
57 | 58 | if ( !wfEmptyMsg( 'newusermessage-signatures', $signatures ) ) { |
58 | 59 | $pattern = '/^\* ?(.*?)$/m'; |