* (bug 1459) Search for duplicate files by hash: Special:FileDuplicateSearch
[lhc/web/wiklou.git] / includes / SpecialStatistics.php
index a2fd645..983dc89 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 /**
+ * Special page lists various statistics, including the contents of
+ * `site_stats`, plus page view details if enabled
  *
  * @addtogroup SpecialPage
  */
@@ -29,7 +31,8 @@ function wfSpecialStatistics( $par = '' ) {
                echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins;images=$images;jobs=$numJobs\n";
                return;
        } else {
-               $text = '==' . wfMsg( 'sitestats' ) . "==\n";
+               $text = "__NOTOC__\n";
+               $text .= '==' . wfMsgNoTrans( 'sitestats' ) . "==\n";
                $text .= wfMsgExt( 'sitestatstext', array( 'parsemag' ),
                        $wgLang->formatNum( $total ),
                        $wgLang->formatNum( $good ),
@@ -39,16 +42,16 @@ function wfSpecialStatistics( $par = '' ) {
                        $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ),
                        $wgLang->formatNum( $numJobs ),
                        $wgLang->formatNum( $images )
-               );
+               )."\n";
 
-               $text .= "\n==" . wfMsg( 'userstats' ) . "==\n";
+               $text .= "==" . wfMsgNoTrans( 'userstats' ) . "==\n";
                $text .= wfMsgExt( 'userstatstext', array ( 'parsemag' ),
                        $wgLang->formatNum( $users ),
                        $wgLang->formatNum( $admins ),
                        '[[' . wfMsgForContent( 'grouppage-sysop' ) . ']]', # TODO somehow remove, kept for backwards compatibility
                        $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ),
                        User::makeGroupLinkWiki( 'sysop' )
-               );
+               )."\n";
 
                global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang;
                if( !$wgDisableCounters && !$wgMiserMode ) {
@@ -70,21 +73,21 @@ function wfSpecialStatistics( $par = '' ) {
                                )
                        );
                        if( $res->numRows() > 0 ) {
-                               $text .= '==' . wfMsg( 'statistics-mostpopular' ) . "==\n";
+                               $text .= "==" . wfMsgNoTrans( 'statistics-mostpopular' ) . "==\n";
                                while( $row = $res->fetchObject() ) {
                                        $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
                                        if( $title instanceof Title )
-                                               $text .= '* [[' . $title->getPrefixedText() . ']] (' . $wgLang->formatNum( $row->page_counter ) . ")\n";
+                                               $text .= '* [[:' . $title->getPrefixedText() . ']] (' . $wgLang->formatNum( $row->page_counter ) . ")\n";
                                }
                                $res->free();
                        }
                }
                
-               $footer = wfMsg( 'statistics-footer' );
+               $footer = wfMsgNoTrans( 'statistics-footer' );
                if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' )
-                       $text .= $footer;
+                       $text .= "\n" . $footer;
                        
                $wgOut->addWikiText( $text );           
        }
        
-}
\ No newline at end of file
+}