Merge "Save pages content in the default format of their content type"
[lhc/web/wiklou.git] / includes / specialpage / SpecialPage.php
index df8d9de..8fc28f8 100644 (file)
@@ -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];
                        }
                }