X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialStatistics.php;h=19850e6a2dd2846a7b8f1814988a562d9a579e6f;hp=86f1e2080cf4954c698094b9265bd5abaf97eb56;hb=c584722cc2e3d33edae58d46c2149063b3fc6d72;hpb=fc1ca75323b5f424a9f8d28d42d85a311ed2f721
diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php
index 86f1e2080c..19850e6a2d 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -95,8 +95,11 @@ class SpecialStatistics extends SpecialPage {
if ( !$msg->isDisabled() ) {
$descriptionHtml = $this->msg( 'parentheses' )->rawParams( $msg->parse() )
->escaped();
- $text .= "
" . Html::rawElement( 'small', [ 'class' => 'mw-statistic-desc' ],
- " $descriptionHtml" );
+ $text .= "
" . Html::rawElement(
+ 'small',
+ [ 'class' => 'mw-statistic-desc' ],
+ " $descriptionHtml"
+ );
}
}
@@ -112,18 +115,22 @@ class SpecialStatistics extends SpecialPage {
* @return string
*/
private function getPageStats() {
+ $linkRenderer = $this->getLinkRenderer();
+
$specialAllPagesTitle = SpecialPage::getTitleFor( 'Allpages' );
$pageStatsHtml = Xml::openElement( 'tr' ) .
Xml::tags( 'th', [ 'colspan' => '2' ], $this->msg( 'statistics-header-pages' )
->parse() ) .
Xml::closeElement( 'tr' ) .
- $this->formatRow( Linker::linkKnown( $specialAllPagesTitle,
- $this->msg( 'statistics-articles' )->parse(), [], [ 'hideredirects' => 1 ] ),
+ $this->formatRow( $linkRenderer->makeKnownLink(
+ $specialAllPagesTitle,
+ $this->msg( 'statistics-articles' )->text(),
+ [], [ 'hideredirects' => 1 ] ),
$this->getLanguage()->formatNum( $this->good ),
[ 'class' => 'mw-statistics-articles' ],
'statistics-articles-desc' ) .
- $this->formatRow( Linker::linkKnown( $specialAllPagesTitle,
- $this->msg( 'statistics-pages' )->parse() ),
+ $this->formatRow( $linkRenderer->makeKnownLink( $specialAllPagesTitle,
+ $this->msg( 'statistics-pages' )->text() ),
$this->getLanguage()->formatNum( $this->total ),
[ 'class' => 'mw-statistics-pages' ],
'statistics-pages-desc' );
@@ -131,8 +138,8 @@ class SpecialStatistics extends SpecialPage {
// Show the image row only, when there are files or upload is possible
if ( $this->images !== 0 || $this->getConfig()->get( 'EnableUploads' ) ) {
$pageStatsHtml .= $this->formatRow(
- Linker::linkKnown( SpecialPage::getTitleFor( 'MediaStatistics' ),
- $this->msg( 'statistics-files' )->parse() ),
+ $linkRenderer->makeKnownLink( SpecialPage::getTitleFor( 'MediaStatistics' ),
+ $this->msg( 'statistics-files' )->text() ),
$this->getLanguage()->formatNum( $this->images ),
[ 'class' => 'mw-statistics-files' ] );
}
@@ -150,9 +157,9 @@ class SpecialStatistics extends SpecialPage {
[ 'class' => 'mw-statistics-edits' ]
) .
$this->formatRow( $this->msg( 'statistics-edits-average' )->parse(),
- $this->getLanguage()
- ->formatNum( sprintf( '%.2f', $this->total ? $this->edits / $this->total : 0 ) ),
- [ 'class' => 'mw-statistics-edits-average' ]
+ $this->getLanguage()->formatNum(
+ sprintf( '%.2f', $this->total ? $this->edits / $this->total : 0 )
+ ), [ 'class' => 'mw-statistics-edits-average' ]
);
}
@@ -166,22 +173,25 @@ class SpecialStatistics extends SpecialPage {
[ 'class' => 'mw-statistics-users' ]
) .
$this->formatRow( $this->msg( 'statistics-users-active' )->parse() . ' ' .
- Linker::linkKnown(
+ $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Activeusers' ),
- $this->msg( 'listgrouprights-members' )->escaped()
+ $this->msg( 'listgrouprights-members' )->text()
),
$this->getLanguage()->formatNum( $this->activeUsers ),
[ 'class' => 'mw-statistics-users-active' ],
'statistics-users-active-desc',
- $this->getLanguage()->formatNum( $this->getConfig()->get( 'ActiveUserDays' ) )
+ $this->getLanguage()->formatNum(
+ $this->getConfig()->get( 'ActiveUserDays' ) )
);
}
private function getGroupStats() {
+ $linkRenderer = $this->getLinkRenderer();
$text = '';
foreach ( $this->getConfig()->get( 'GroupPermissions' ) as $group => $permissions ) {
# Skip generic * and implicit groups
- if ( in_array( $group, $this->getConfig()->get( 'ImplicitGroups' ) ) || $group == '*' ) {
+ if ( in_array( $group, $this->getConfig()->get( 'ImplicitGroups' ) )
+ || $group == '*' ) {
continue;
}
$groupname = htmlspecialchars( $group );
@@ -193,24 +203,25 @@ class SpecialStatistics extends SpecialPage {
}
$msg = $this->msg( 'grouppage-' . $groupname )->inContentLanguage();
if ( $msg->isBlank() ) {
- $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname;
+ $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) .
+ ':' . $groupname;
} else {
$grouppageLocalized = $msg->text();
}
$linkTarget = Title::newFromText( $grouppageLocalized );
if ( $linkTarget ) {
- $grouppage = Linker::link(
+ $grouppage = $linkRenderer->makeLink(
$linkTarget,
- htmlspecialchars( $groupnameLocalized )
+ $groupnameLocalized
);
} else {
$grouppage = htmlspecialchars( $groupnameLocalized );
}
- $grouplink = Linker::linkKnown(
+ $grouplink = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Listusers' ),
- $this->msg( 'listgrouprights-members' )->escaped(),
+ $this->msg( 'listgrouprights-members' )->text(),
[],
[ 'group' => $group ]
);