Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -417,6 +417,8 @@ |
418 | 418 | * (bug 10347) Add subtitle message to indicate that the page being viewed is |
419 | 419 | protected. |
420 | 420 | * Double encoding broke Special:Newpages for some languages |
| 421 | +* Adding a newline before the statistics footer, to prevent parsing problems |
| 422 | +* Preventing the TOC from appearing in Special:Statistics |
421 | 423 | |
422 | 424 | == API changes since 1.10 == |
423 | 425 | |
Index: trunk/phase3/includes/SpecialStatistics.php |
— | — | @@ -31,7 +31,8 @@ |
32 | 32 | echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins;images=$images;jobs=$numJobs\n"; |
33 | 33 | return; |
34 | 34 | } else { |
35 | | - $text = '==' . wfMsg( 'sitestats' ) . "==\n"; |
| 35 | + $text = "__NOTOC__\n"; |
| 36 | + $text .= '==' . wfMsg( 'sitestats' ) . "==\n"; |
36 | 37 | $text .= wfMsgExt( 'sitestatstext', array( 'parsemag' ), |
37 | 38 | $wgLang->formatNum( $total ), |
38 | 39 | $wgLang->formatNum( $good ), |
— | — | @@ -41,16 +42,16 @@ |
42 | 43 | $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ), |
43 | 44 | $wgLang->formatNum( $numJobs ), |
44 | 45 | $wgLang->formatNum( $images ) |
45 | | - ); |
| 46 | + )."\n"; |
46 | 47 | |
47 | | - $text .= "\n==" . wfMsg( 'userstats' ) . "==\n"; |
| 48 | + $text .= "==" . wfMsg( 'userstats' ) . "==\n"; |
48 | 49 | $text .= wfMsgExt( 'userstatstext', array ( 'parsemag' ), |
49 | 50 | $wgLang->formatNum( $users ), |
50 | 51 | $wgLang->formatNum( $admins ), |
51 | 52 | '[[' . wfMsgForContent( 'grouppage-sysop' ) . ']]', # TODO somehow remove, kept for backwards compatibility |
52 | 53 | $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ), |
53 | 54 | User::makeGroupLinkWiki( 'sysop' ) |
54 | | - ); |
| 55 | + )."\n"; |
55 | 56 | |
56 | 57 | global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang; |
57 | 58 | if( !$wgDisableCounters && !$wgMiserMode ) { |
— | — | @@ -72,7 +73,7 @@ |
73 | 74 | ) |
74 | 75 | ); |
75 | 76 | if( $res->numRows() > 0 ) { |
76 | | - $text .= "\n==" . wfMsg( 'statistics-mostpopular' ) . "==\n"; |
| 77 | + $text .= "==" . wfMsg( 'statistics-mostpopular' ) . "==\n"; |
77 | 78 | while( $row = $res->fetchObject() ) { |
78 | 79 | $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); |
79 | 80 | if( $title instanceof Title ) |
— | — | @@ -84,7 +85,7 @@ |
85 | 86 | |
86 | 87 | $footer = wfMsg( 'statistics-footer' ); |
87 | 88 | if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' ) |
88 | | - $text .= $footer; |
| 89 | + $text .= "\n" . $footer; |
89 | 90 | |
90 | 91 | $wgOut->addWikiText( $text ); |
91 | 92 | } |