X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialSpecialpages.php;h=b18b370c6b91ff26dc903de8ff3b323ba7383ee2;hb=e01fd443887b47c86d5248a4a32eca5e5ed98a97;hp=eff06f4603ba3b976dab6d43f7a0b6109a8dd43f;hpb=1aad5d4bf7c0bb72fc59de00a6c8998f37abde4b;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php
index eff06f4603..b18b370c6b 100644
--- a/includes/specials/SpecialSpecialpages.php
+++ b/includes/specials/SpecialSpecialpages.php
@@ -45,6 +45,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
return;
}
+ $this->addHelpLink( 'Help:Special pages' );
$this->outputPageList( $groups );
}
@@ -57,19 +58,19 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
}
/** Put them into a sortable array */
- $groups = array();
+ $groups = [];
/** @var SpecialPage $page */
foreach ( $pages as $page ) {
if ( $page->isListed() ) {
$group = $page->getFinalGroupName();
if ( !isset( $groups[$group] ) ) {
- $groups[$group] = array();
+ $groups[$group] = [];
}
- $groups[$group][$page->getDescription()] = array(
+ $groups[$group][$page->getDescription()] = [
$page->getPageTitle(),
$page->isRestricted(),
$page->isCached()
- );
+ ];
}
}
@@ -95,27 +96,19 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
$includesCachedPages = false;
foreach ( $groups as $group => $sortedPages ) {
- $total = count( $sortedPages );
- $middle = ceil( $total / 2 );
- $count = 0;
$out->wrapWikiMsg(
"
$1
\n",
"specialpages-group-$group"
);
$out->addHTML(
- Html::openElement(
- 'table',
- array( 'style' => 'width:100%;', 'class' => 'mw-specialpages-table' )
- ) . "\n" .
- Html::openElement( 'tr' ) . "\n" .
- Html::openElement( 'td', array( 'style' => 'width:30%;vertical-align:top' ) ) . "\n" .
- Html::openElement( 'ul' ) . "\n"
+ Html::openElement( 'div', [ 'class' => 'mw-specialpages-list' ] )
+ . ''
);
foreach ( $sortedPages as $desc => $specialpage ) {
list( $title, $restricted, $cached ) = $specialpage;
- $pageClasses = array();
+ $pageClasses = [];
if ( $cached ) {
$includesCachedPages = true;
$pageClasses[] = 'mw-specialpagecached';
@@ -125,27 +118,16 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
$pageClasses[] = 'mw-specialpagerestricted';
}
- $link = Linker::linkKnown( $title, htmlspecialchars( $desc ) );
+ $link = $this->getLinkRenderer()->makeKnownLink( $title, $desc );
$out->addHTML( Html::rawElement(
'li',
- array( 'class' => implode( ' ', $pageClasses ) ),
+ [ 'class' => implode( ' ', $pageClasses ) ],
$link
) . "\n" );
-
- # Split up the larger groups
- $count++;
- if ( $total > 3 && $count == $middle ) {
- $out->addHTML(
- Html::closeElement( 'ul' ) . Html::closeElement( 'td' ) .
- Html::element( 'td', array( 'style' => 'width:10%' ), '' ) .
- Html::openElement( 'td', array( 'style' => 'width:30%' ) ) . Html::openElement( 'ul' ) . "\n"
- );
- }
}
$out->addHTML(
- Html::closeElement( 'ul' ) . Html::closeElement( 'td' ) .
- Html::element( 'td', array( 'style' => 'width:30%' ), '' ) .
- Html::closeElement( 'tr' ) . Html::closeElement( 'table' ) . "\n"
+ Html::closeElement( 'ul' ) .
+ Html::closeElement( 'div' )
);
}