r84980 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84979‎ | r84980 | r84981 >
Date:21:11, 29 March 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
removing ridiculously complex message sanitizing and using an extension-local copy of the message instead
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)
  • /trunk/extensions/SemanticForms/languages/SF_Messages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -29,17 +29,8 @@
3030 $vars['sfgBadNumberErrorStr'] = wfMsg( 'sf_bad_number_error' );
3131 $vars['sfgBadIntegerErrorStr'] = wfMsg( 'sf_bad_integer_error' );
3232 $vars['sfgBadDateErrorStr'] = wfMsg( 'sf_bad_date_error' );
 33+ $vars['sfgAnonEditWarning'] = wfMsg( 'sf_autoedit_anoneditwarning' );
3334
34 - // $wgParser might not be initialized, e.g. on Special pages
35 - if ( $wgParser->mOptions == null ) {
36 - $parser = new Parser();
37 - $msg = $parser -> parse (wfMsg( 'anoneditwarning' ), new Title(), ParserOptions::newFromUser( $wgUser ) ) -> getText();
38 - } else {
39 - $msg = $wgParser->recursiveTagParse( wfMsg( 'anoneditwarning' ) );
40 - }
41 -
42 - $vars['sfgAnonEditWarning'] = StringUtils::delimiterReplace( '<', '>', '', $msg );
43 -
4435 return true;
4536 }
4637
Index: trunk/extensions/SemanticForms/languages/SF_Messages.php
@@ -137,7 +137,8 @@
138138 'sf_formedit_saveandcontinueediting' => 'Save and Continue',
139139 'sf_formedit_tooltip_saveandcontinueediting' => 'Save data and continue editing',
140140 'sf_formedit_accesskey_saveandcontinueediting' => 'a',
141 - 'sf_autoedit_success' => 'Successfully modified [[$1]] using form $2.',
 141+ 'sf_autoedit_anoneditwarning' => 'Warning: You are not logged in. Your IP address will be recorded in this page\'s edit history.',
 142+ 'sf_autoedit_success' => 'Successfully modified [[$1]] using form $2.',
142143 'runquery' => 'Run query',
143144 'sf_runquery_badurl' => 'You must specify a form name in the URL;
144145 the URL should look like \'Special:RunQuery/<form name>\'.',
@@ -208,6 +209,7 @@
209210 'sf_form_freetextlabel' => '{{Identical|Free text}}',
210211 'right-viewedittab' => '{{doc-right|viewedittab}}',
211212 'right-editrestrictedfields' => '{{doc-right|editrestrictedfields}}',
 213+ 'sf_autoedit_anoneditwarning' => 'This is a copy of the general MediaWiki "anoneditwarning" message, but without any markup.',
212214 );
213215
214216 /** Niuean (ko e vagahau Niuē)

Follow-up revisions

RevisionCommit summaryAuthorDate
r85083Added support for default of 'minor edit' setting ($wgDefaultUserOptions['min...yaron20:04, 31 March 2011