MediaWiki r83277 - Code Review

Jump to: navigation, search
Revision:r83276‎ | r83277 (on ViewVC)‎ | r83278 >
Date:08:23, 5 March 2011
Status:deferred (Comments)
* update Maintenance extension to 2.0.0
Modified paths:

Diff [purge]

Loading diff…

Follow-up revisions

Rev.Commit summaryAuthorDate
r83278* revert changes to Maintenance.alias.php introduced in r83277skizzerz08:47, 5 March 2011
r83279* add property svn:eol-style native on metadata.ini fileskizzerz08:50, 5 March 2011


#Comment by Skizzerz (talk | contribs)   08:51, 5 March 2011

2 follow-up revisions:

  • r83278 reverted the changes to the alias.php file (didn't realize that the file format updated)
  • r83279 adds svn:eol-style native to the metadata.ini file
#Comment by Nikerabbit (talk | contribs)   09:48, 5 March 2011
  • @ should be replaced with wf(Suppress|Restore)Warnings
  • Don't use $wgOut->addHtml( wfMsg() )
  • Latest updates in i18n files seem to have been reverted
  • This nicely exposed all db passwords among others: $wgOut->addHTML( htmlspecialchars( print_r( $GLOBALS, true ) ) );
  • makeKnownLinkObj() is deprecated, it can be replaced with link()
  • What's up with the many new i18n messages which don't seem to be used?
#Comment by Skizzerz (talk | contribs)   11:17, 5 March 2011
  • Will do the warnings thing for next time
  • Yeah, I'm not sure why I did that since I already know about addWikiMsg...
  • I'll take a look at that. I know that the alias.php file got borked so I reverted it back to what it was before this commit, but I didn't see any issues with the i18n file.
  • That is why access should be restricted to this page. Even if that wasn't there, you'd still be able to get at the db passwords by running the sql script.
  • Same as the addWikiMsg thing, knew about it yet somehow didn't fix it...
  • They are used. How this extension now works is that it runs the execute() method of each maintenance script class and then captures its output. It then runs that output through a bunch of string searches/regexes to replace the hardcoded English output with potentially localised output. These rules are found in the metadata.ini file. Is it ugly? Yes, it is, but unfortunately it's the only way to localise maintenance scripts at this point until someone goes through and actually makes the scripts themselves take a language parameter or something similar to output messages in a given language.

Status & tagging log

  • 21:21, 26 May 2011 Reedy (talk | contribs) changed the status of r83277 [removed: new added: deferred]