* 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 {
$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',
+ ) );
+ }
}
/**
* @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 );
* @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();
// 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];
}
}