X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FSpecialPage.php;h=8fc28f88ce6db906220d744886a5d55b7b58f658;hb=98168be936af8c0e5351568373bccd82b9be4e68;hp=df8d9de816c1d2f5348fb38bdcec0154e2cd521c;hpb=d0439af89f6b254cea09b3773ab139f04f81a97d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index df8d9de816..8fc28f88ce 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -27,7 +27,6 @@ * Includes some static functions for handling the special page list deprecated * in favor of SpecialPageFactory. * - * @todo Turn this into a real ContextSource * @ingroup SpecialPage */ class SpecialPage { @@ -334,6 +333,12 @@ class SpecialPage { $out->setArticleRelated( false ); $out->setRobotPolicy( $this->getRobotPolicy() ); $out->setPageTitle( $this->getDescription() ); + if ( $this->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) { + $out->addModuleStyles( array( + 'mediawiki.ui.input', + 'mediawiki.ui.checkbox', + ) ); + } } /** @@ -597,11 +602,9 @@ class SpecialPage { * @param array $params */ protected function addFeedLinks( $params ) { - global $wgFeedClasses; - $feedTemplate = wfScript( 'api' ); - foreach ( $wgFeedClasses as $format => $class ) { + foreach ( $this->getConfig()->get( 'FeedClasses' ) as $format => $class ) { $theseParams = $params + array( 'feedformat' => $format ); $url = wfAppendQuery( $feedTemplate, $theseParams ); $this->getOutput()->addFeedLink( $format, $url ); @@ -617,8 +620,8 @@ class SpecialPage { * @since 1.21 */ public function getFinalGroupName() { - global $wgSpecialPageGroups; $name = $this->getName(); + $specialPageGroups = $this->getConfig()->get( 'SpecialPageGroups' ); // Allow overbidding the group from the wiki side $msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage(); @@ -631,8 +634,8 @@ class SpecialPage { // Group '-' is used as default to have the chance to determine, // if the special pages overrides this method, // if not overridden, $wgSpecialPageGroups is checked for b/c - if ( $group === '-' && isset( $wgSpecialPageGroups[$name] ) ) { - $group = $wgSpecialPageGroups[$name]; + if ( $group === '-' && isset( $specialPageGroups[$name] ) ) { + $group = $specialPageGroups[$name]; } }