Jump to content

Extension talk:IncludeBikemap

Add topic
From mediawiki.org
Latest comment: 14 years ago by Singlespeedfahrer in topic Code review


Code review

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hi, just noticed this extension and I see some issues with code:

  • First of all, great to see that this extension is XSS-safe, however you don't need to apply escaping to $wgIBMsize - it is not outputted to pages directly.
  • We use prefix wg for global configuration variables (wg stands for "wiki global"), you don't need to use it for internal variables.
  • wfMsg*() functions are used to retrieve messages from message files and optionally transform them (by parsing wikitext, substituting parameters like $1 with provided values and so on). They can't be used with random input like wfMsgForContent('uncorrect id: '). See Localisation for details. Max Semenik 11:56, 5 March 2011 (UTC)Reply
Hi, many thanks for your code review! I have to learn a lot about writing those extensions. So I'm pleased of your fast response. I fixed the code now as you have suggested. Best wishes. Singlespeedfahrer 14:03, 5 March 2011 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.