r35835 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35834‎ | r35835 | r35836 >
Date:00:20, 4 June 2008
Author:siebrand
Status:old
Tags:
Comment:
Fix on r35832. Re-add pre-set of globals to prevent register_globals exploits. Thanks brion.
Modified paths:
  • /trunk/extensions/NewUserMessage/NewUserMessage.class.php (modified) (history)
  • /trunk/extensions/NewUserMessage/NewUserMessage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NewUserMessage/NewUserMessage.php
@@ -12,24 +12,24 @@
1313 if (!defined('MEDIAWIKI'))
1414 die('Not an entry point.');
1515
16 -define('NEWUSERMESSAGE_VERSION','1.2, 2008-06-04');
 16+define('NEWUSERMESSAGE_VERSION','1.2.1, 2008-06-04');
1717
1818 // Specify a template to wrap the new user message within
1919 $wgNewUserMessageTemplate = 'MediaWiki:NewUserMessage';
2020
21 -// Should the new user message creation be a minor edit?
22 -$wgNewUserMinorEdit = true;
23 -
2421 // Set the username of the user that makes the edit on user talk pages. If
2522 // this user does not exist, the new user will show up as editing user.
26 -// default: $wgNewUserMessageEditor = 'Admin';
 23+$wgNewUserMessageEditor = 'Admin';
2724
2825 // Edit summary for the recent changes entry of a new users message
29 -// default: $wgNewUserEditSummary = "Adding [[$wgNewUserMessageTemplate|welcome message]] to new user's talk page";
 26+$wgNewUserEditSummary = "Adding [[$wgNewUserMessageTemplate|welcome message]] to new user's talk page";
3027
3128 // Specify whether or not the new user message creation should show up in recent changes
32 -// default: $wgNewUserSupressRC = false;
 29+$wgNewUserSupressRC = false;
3330
 31+// Should the new user message creation be a minor edit?
 32+$wgNewUserMinorEdit = true;
 33+
3434 $dir = dirname(__FILE__) . '/';
3535 $wgExtensionMessagesFiles['NewUserMessage'] = $dir . 'NewUserMessage.i18n.php';
3636 $wgAutoloadClasses['NewUserMessage'] = $dir . 'NewUserMessage.class.php';
Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php
@@ -40,9 +40,6 @@
4141 $flags = 0;
4242 if ($wgNewUserMinorEdit) $flags = $flags | EDIT_MINOR;
4343 if ($wgNewUserSupressRC) $flags = $flags | EDIT_SUPPRESS_RC;
44 - if (!$wgNewUserMessageEditor) $wgNewUserMessageEditor = 'Admin';
45 - if (!$wgNewUserMessageTemplate) $wgNewUserMessageTemplate = 'MediaWiki:NewUserMessage';
46 - if (!$wgNewUserEditSummary) $wgNewUserEditSummary = "Adding [[$wgNewUserMessageTemplate|welcome message]] to new user's talk page";
4744
4845 $article->doEdit('{'.'{'."$wgNewUserMessageTemplate|$name}}", $wgNewUserEditSummary, $flags);
4946 $wgUser = $parkedWgUser;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35832* add hook code to class file...siebrand00:04, 4 June 2008

Status & tagging log