r23072 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23071‎ | r23072 | r23073 >
Date:15:34, 18 June 2007
Author:brion
Status:old
Tags:
Comment:
whitespace consistency
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -35,20 +35,20 @@
3636 title to all uppercase letters. Currently, in MediaWiki code, we
3737 would handle this as follows (note: not real code, here):
3838
39 - function showAnArticle($article) {
40 - global $wgReverseTitle, $wgCapitalizeTitle;
41 -
42 - if ($wgReverseTitle) {
43 - wfReverseTitle($article);
44 - }
45 -
46 - if ($wgCapitalizeTitle) {
47 - wfCapitalizeTitle($article);
48 - }
49 -
50 - # code to actually show the article goes here
51 - }
 39+ function showAnArticle($article) {
 40+ global $wgReverseTitle, $wgCapitalizeTitle;
5241
 42+ if ($wgReverseTitle) {
 43+ wfReverseTitle($article);
 44+ }
 45+
 46+ if ($wgCapitalizeTitle) {
 47+ wfCapitalizeTitle($article);
 48+ }
 49+
 50+ # code to actually show the article goes here
 51+ }
 52+
5353 An extension writer, or a local admin, will often add custom code to
5454 the function -- with or without a global variable. For example,
5555 someone wanting email notification when an article is shown may add:

Follow-up revisions

RevisionCommit summaryAuthorDate
r23087Merged revisions 23050-23086 via svnmerge from...david03:14, 19 June 2007

Status & tagging log