X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialSpecialpages.php;h=47c89d0d56325e5f9480f138843cdc240efb87cb;hb=209f584b6c9bc7779e3eebb77d3a4cf65f3f1a67;hp=1e7c8bb5654644c11a55a87a05e8b9940c3fea13;hpb=2b69c9525bcf75ad0ea203d4256cfef9e3d6fd40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index 1e7c8bb565..3ba50bbd07 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -53,21 +53,22 @@ class SpecialSpecialpages extends UnlistedSpecialPage { $pages = SpecialPageFactory::getUsablePages( $this->getUser() ); - if( !count( $pages ) ) { + if ( !count( $pages ) ) { # Yeah, that was pointless. Thanks for coming. return false; } /** Put them into a sortable array */ $groups = array(); + /** @var SpecialPage $page */ foreach ( $pages as $page ) { if ( $page->isListed() ) { - $group = SpecialPageFactory::getGroup( $page ); - if( !isset( $groups[$group] ) ) { + $group = $page->getFinalGroupName(); + if ( !isset( $groups[$group] ) ) { $groups[$group] = array(); } $groups[$group][$page->getDescription()] = array( - $page->getTitle(), + $page->getPageTitle(), $page->isRestricted(), $page->isCached() ); @@ -76,13 +77,13 @@ class SpecialSpecialpages extends UnlistedSpecialPage { /** Sort */ if ( $wgSortSpecialPages ) { - foreach( $groups as $group => $sortedPages ) { + foreach ( $groups as $group => $sortedPages ) { ksort( $groups[$group] ); } } /** Always move "other" to end */ - if( array_key_exists( 'other', $groups ) ) { + if ( array_key_exists( 'other', $groups ) ) { $other = $groups['other']; unset( $groups['other'] ); $groups['other'] = $other; @@ -102,14 +103,20 @@ class SpecialSpecialpages extends UnlistedSpecialPage { $middle = ceil( $total / 2 ); $count = 0; - $out->wrapWikiMsg( "