User:Catrope/Extension review/Babel

Jump to: navigation, search

BABEL REVIEW /trunk/extensions/Babel @ r88357

Most important issues:

  1. It looks like the first parameter of each template invocation is lost
  2. CSS should be loaded done in r94138
  3. Possible oldid-induced bug due to wrong use of Article constructor r94210
  4. No validity check for category creator user name done in r92141



  • Babel::Render()
    • (1) $templateParameter[0] is unused. Did you mean $templateParameters (plural)?
      • Looks like you did; right now the first parameter is overwritten with the template name
  • Babel::mReplaceCategoryVariables()
    • Use strtr(). Much easier and guards against double substitution bugs done in r96747


  • (2) Why don't you just load this file (with ResourceLoader of course)?
    • Local sysops can put overrides in MediaWiki:Common.css if they want to
    • ResourceLoader automatically flips rules on RTL wikis


  • BabelAutoCreate::create()
    • (3) Use new Article( $title, 0 ) instead of new Article( $title )
  • BabelAutoCreate::user()
    • (4) Why is false being passed to User::newFromName() to suppress the validity check? It seems to me that a user name you're about to create should be valid