r34702 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34701‎ | r34702 | r34703 >
Date:00:16, 13 May 2008
Author:nad
Status:old
Tags:
Comment:
add setting
Modified paths:
  • /trunk/extensions/NewUserMessage/NewUserMessage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NewUserMessage/NewUserMessage.php
@@ -12,7 +12,7 @@
1313 if (!defined('MEDIAWIKI'))
1414 die('Not an entry point.');
1515
16 -define('NEWUSERMESSAGE_VERSION','1.1.1, 2008-05-13');
 16+define('NEWUSERMESSAGE_VERSION','1.1.2, 2008-05-13');
1717
1818 // Specify a template to wrap the new user message within
1919 $wgNewUserMessageTemplate = 'MediaWiki:NewUserMessage';
@@ -21,7 +21,10 @@
2222 // this user does not exist, the new user will show up as editing user.
2323 $wgNewUserMessageEditor = 'Admin';
2424
25 -// Sepcify whether or not the new user message creation should show up in recent changes
 25+// Edit summary for the recent changes entry of a new users message
 26+$wgNewUserEditSummary = "Adding [[MediaWiki:NewUserMessage|welcome message]] to new user's talk page";
 27+
 28+// Specify whether or not the new user message creation should show up in recent changes
2629 $wgNewUserSupressRC = false;
2730
2831 // Should the new user message creation be a minor edit?
@@ -45,7 +48,7 @@
4649 * Add the template message if the users talk page doesn't already exist
4750 */
4851 function wfCreateNewUserMessage($user) {
49 - global $wgNewUserMessageTemplate, $wgNewUserMinorEdit, $wgNewUserSupressRC;
 52+ global $wgNewUserMessageTemplate, $wgNewUserMinorEdit, $wgNewUserSupressRC, $wgNewUserEditSummary;
5053
5154 $name = $user->getName();
5255 $talk = $user->getTalkPage();
@@ -70,7 +73,7 @@
7174 if ($wgNewUserMinorEdit) $flags = $flags | EDIT_MINOR;
7275 if ($wgNewUserSupressRC) $flags = $flags | EDIT_SUPPRESS_RC;
7376
74 - $article->doEdit('{'.'{'."$wgNewUserMessageTemplate|$name}}", false, $flags);
 77+ $article->doEdit('{'.'{'."$wgNewUserMessageTemplate|$name}}", $wgNewUserEditSummary, $flags);
7578 $wgUser = $parkedWgUser;
7679 }
7780

Status & tagging log