r25180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25179‎ | r25180 | r25181 >
Date:23:08, 26 August 2007
Author:rotem
Status:old
Tags:
Comment:
* Adding a newline before the statistics footer, to prevent parsing problems
* Preventing the TOC from appearing in Special:Statistics
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialStatistics.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -417,6 +417,8 @@
418418 * (bug 10347) Add subtitle message to indicate that the page being viewed is
419419 protected.
420420 * 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
421423
422424 == API changes since 1.10 ==
423425
Index: trunk/phase3/includes/SpecialStatistics.php
@@ -31,7 +31,8 @@
3232 echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins;images=$images;jobs=$numJobs\n";
3333 return;
3434 } else {
35 - $text = '==' . wfMsg( 'sitestats' ) . "==\n";
 35+ $text = "__NOTOC__\n";
 36+ $text .= '==' . wfMsg( 'sitestats' ) . "==\n";
3637 $text .= wfMsgExt( 'sitestatstext', array( 'parsemag' ),
3738 $wgLang->formatNum( $total ),
3839 $wgLang->formatNum( $good ),
@@ -41,16 +42,16 @@
4243 $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ),
4344 $wgLang->formatNum( $numJobs ),
4445 $wgLang->formatNum( $images )
45 - );
 46+ )."\n";
4647
47 - $text .= "\n==" . wfMsg( 'userstats' ) . "==\n";
 48+ $text .= "==" . wfMsg( 'userstats' ) . "==\n";
4849 $text .= wfMsgExt( 'userstatstext', array ( 'parsemag' ),
4950 $wgLang->formatNum( $users ),
5051 $wgLang->formatNum( $admins ),
5152 '[[' . wfMsgForContent( 'grouppage-sysop' ) . ']]', # TODO somehow remove, kept for backwards compatibility
5253 $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ),
5354 User::makeGroupLinkWiki( 'sysop' )
54 - );
 55+ )."\n";
5556
5657 global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang;
5758 if( !$wgDisableCounters && !$wgMiserMode ) {
@@ -72,7 +73,7 @@
7374 )
7475 );
7576 if( $res->numRows() > 0 ) {
76 - $text .= "\n==" . wfMsg( 'statistics-mostpopular' ) . "==\n";
 77+ $text .= "==" . wfMsg( 'statistics-mostpopular' ) . "==\n";
7778 while( $row = $res->fetchObject() ) {
7879 $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
7980 if( $title instanceof Title )
@@ -84,7 +85,7 @@
8586
8687 $footer = wfMsg( 'statistics-footer' );
8788 if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' )
88 - $text .= $footer;
 89+ $text .= "\n" . $footer;
8990
9091 $wgOut->addWikiText( $text );
9192 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r25223Merged revisions 25126-25214 via svnmerge from...david07:39, 28 August 2007

Status & tagging log