From 7f1facb2f5cdad9fdee8b02d9066ba111de13729 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 9 Nov 2010 17:00:35 +0000 Subject: [PATCH] * (bug 17789) Added a note to the total views on Special:Statistics saying that is doesn't count non-existing pages and special pages --- RELEASE-NOTES | 2 ++ includes/specials/SpecialStatistics.php | 7 +++++-- languages/messages/MessagesEn.php | 1 + maintenance/language/messages.inc | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 43c50c15f0..c68b843176 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -412,6 +412,8 @@ LocalSettings.php. The specific bugs are listed below in the general notes. normalised like normal links to special pages * (bug 21364) External links using link= attribute on images now respect $wgExternalLinkTarget +* (bug 17789) Added a note to the total views on Special:Statistics saying that + is doesn't count non-existing pages and special pages === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index 5f2fb1f60a..b0d0246e37 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -187,6 +187,7 @@ class SpecialStatistics extends SpecialPage { 'statistics-users-active-desc', $wgLang->formatNum( $wgActiveUserDays ) ); } + private function getGroupStats() { global $wgGroupPermissions, $wgImplicitGroups, $wgLang, $wgUser; $sk = $wgUser->getSkin(); @@ -233,6 +234,7 @@ class SpecialStatistics extends SpecialPage { } return $text; } + private function getViewsStats() { global $wgLang; return Xml::openElement( 'tr' ) . @@ -240,12 +242,13 @@ class SpecialStatistics extends SpecialPage { Xml::closeElement( 'tr' ) . $this->formatRow( wfMsgExt( 'statistics-views-total', array( 'parseinline' ) ), $wgLang->formatNum( $this->views ), - array ( 'class' => 'mw-statistics-views-total' ) ) . + array ( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) . $this->formatRow( wfMsgExt( 'statistics-views-peredit', array( 'parseinline' ) ), $wgLang->formatNum( sprintf( '%.2f', $this->edits ? $this->views / $this->edits : 0 ) ), array ( 'class' => 'mw-statistics-views-peredit' ) ); } + private function getMostViewedPages() { global $wgLang, $wgUser; $text = ''; @@ -284,7 +287,7 @@ class SpecialStatistics extends SpecialPage { } return $text; } - + private function getOtherStats( $stats ) { global $wgLang; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index f3361da216..72fb2af2de 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2382,6 +2382,7 @@ Remember to check for other links to the templates before deleting them.', 'statistics-edits' => 'Page edits since {{SITENAME}} was set up', 'statistics-edits-average' => 'Average edits per page', 'statistics-views-total' => 'Views total', +'statistics-views-total-desc' => 'Views to non-existing pages and special pages are not included', 'statistics-views-peredit' => 'Views per edit', 'statistics-users' => 'Registered [[Special:ListUsers|users]]', 'statistics-users-active' => 'Active users', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index ce0405ead1..8ee02dd274 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1473,6 +1473,7 @@ $wgMessageStructure = array( 'statistics-edits', 'statistics-edits-average', 'statistics-views-total', + 'statistics-views-total-desc' 'statistics-views-peredit', 'statistics-users', 'statistics-users-active', -- 2.20.1