Merge "Remove obsolete showCacheStats.php and showCacheStats.php"
[lhc/web/wiklou.git] / includes / specials / SpecialStatistics.php
index 8de6f8b..a989aac 100644 (file)
@@ -36,8 +36,6 @@ class SpecialStatistics extends SpecialPage {
        }
 
        public function execute( $par ) {
-               global $wgMemc;
-
                $miserMode = $this->getConfig()->get( 'MiserMode' );
 
                $this->setHeaders();
@@ -51,17 +49,6 @@ class SpecialStatistics extends SpecialPage {
                $this->activeUsers = SiteStats::activeUsers();
                $this->hook = '';
 
-               # Set active user count
-               if ( !$miserMode ) {
-                       $key = wfMemcKey( 'sitestats', 'activeusers-updated' );
-                       // Re-calculate the count if the last tally is old...
-                       if ( !$wgMemc->get( $key ) ) {
-                               $dbw = wfGetDB( DB_MASTER );
-                               SiteStatsUpdate::cacheUpdate( $dbw );
-                               $wgMemc->set( $key, '1', 24 * 3600 ); // don't update for 1 day
-                       }
-               }
-
                $text = Xml::openElement( 'table', array( 'class' => 'wikitable mw-statistics-table' ) );
 
                # Statistic - pages
@@ -127,16 +114,18 @@ class SpecialStatistics extends SpecialPage {
         * @return string
         */
        private function getPageStats() {
+               $specialAllPagesTitle = SpecialPage::getTitleFor( 'Allpages' );
                $pageStatsHtml = Xml::openElement( 'tr' ) .
                        Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-pages' )
                                ->parse() ) .
                        Xml::closeElement( 'tr' ) .
-                               $this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Allpages' ),
-                                       $this->msg( 'statistics-articles' )->parse() ),
+                               $this->formatRow( Linker::linkKnown( $specialAllPagesTitle,
+                                       $this->msg( 'statistics-articles' )->parse(), array(), array( 'hideredirects' => 1 ) ),
                                        $this->getLanguage()->formatNum( $this->good ),
                                        array( 'class' => 'mw-statistics-articles' ),
                                        'statistics-articles-desc' ) .
-                               $this->formatRow( $this->msg( 'statistics-pages' )->parse(),
+                               $this->formatRow( Linker::linkKnown( $specialAllPagesTitle,
+                                       $this->msg( 'statistics-pages' )->parse() ),
                                        $this->getLanguage()->formatNum( $this->total ),
                                        array( 'class' => 'mw-statistics-pages' ),
                                        'statistics-pages-desc' );