Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -35,20 +35,20 @@ |
36 | 36 | title to all uppercase letters. Currently, in MediaWiki code, we |
37 | 37 | would handle this as follows (note: not real code, here): |
38 | 38 | |
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; |
52 | 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 | + } |
| 52 | + |
53 | 53 | An extension writer, or a local admin, will often add custom code to |
54 | 54 | the function -- with or without a global variable. For example, |
55 | 55 | someone wanting email notification when an article is shown may add: |