Merge "mw.widgets: Use CSS grid for the calendar in supporting browsers"
[lhc/web/wiklou.git] / includes / specialpage / SpecialPage.php
index 5db8066..e18eacc 100644 (file)
@@ -95,7 +95,8 @@ class SpecialPage implements MessageLocalizer {
         * @return TitleValue
         */
        public static function getTitleValueFor( $name, $subpage = false, $fragment = '' ) {
-               $name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
+               $name = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                       getLocalNameFor( $name, $subpage );
 
                return new TitleValue( NS_SPECIAL, $name, $fragment );
        }
@@ -108,7 +109,8 @@ class SpecialPage implements MessageLocalizer {
         * @return Title|null Title object or null if the page doesn't exist
         */
        public static function getSafeTitleFor( $name, $subpage = false ) {
-               $name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
+               $name = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                       getLocalNameFor( $name, $subpage );
                if ( $name ) {
                        return Title::makeTitleSafe( NS_SPECIAL, $name );
                } else {
@@ -182,7 +184,7 @@ class SpecialPage implements MessageLocalizer {
        /**
         * Get or set whether this special page is listed in Special:SpecialPages
         * @since 1.6
-        * @param bool $x
+        * @param bool|null $x
         * @return bool
         */
        function listed( $x = null ) {
@@ -220,7 +222,7 @@ class SpecialPage implements MessageLocalizer {
 
        /**
         * Whether the special page is being evaluated via transclusion
-        * @param bool $x
+        * @param bool|null $x
         * @return bool
         */
        function including( $x = null ) {
@@ -233,7 +235,8 @@ class SpecialPage implements MessageLocalizer {
         */
        function getLocalName() {
                if ( !isset( $this->mLocalName ) ) {
-                       $this->mLocalName = SpecialPageFactory::getLocalNameFor( $this->mName );
+                       $this->mLocalName = MediaWikiServices::getInstance()->getSpecialPageFactory()->
+                               getLocalNameFor( $this->mName );
                }
 
                return $this->mLocalName;
@@ -388,7 +391,8 @@ class SpecialPage implements MessageLocalizer {
         * Note that this does not in any way check that the user is authorized to use this special page
         * (use checkPermissions() for that).
         *
-        * @param string $level A security level. Can be an arbitrary string, defaults to the page name.
+        * @param string|null $level A security level. Can be an arbitrary string, defaults to the page
+        *   name.
         * @return bool False means a redirect to the reauthentication page has been set and processing
         *   of the special page should be aborted.
         * @throws ErrorPageError If the security level cannot be met, even with reauthentication.
@@ -627,10 +631,9 @@ class SpecialPage implements MessageLocalizer {
         * @param string $summaryMessageKey Message key of the summary
         */
        function outputHeader( $summaryMessageKey = '' ) {
-               global $wgContLang;
-
                if ( $summaryMessageKey == '' ) {
-                       $msg = $wgContLang->lc( $this->getName() ) . '-summary';
+                       $msg = MediaWikiServices::getInstance()->getContentLanguage()->lc( $this->getName() ) .
+                               '-summary';
                } else {
                        $msg = $summaryMessageKey;
                }
@@ -831,8 +834,9 @@ class SpecialPage implements MessageLocalizer {
                        return;
                }
 
-               global $wgContLang;
-               $msg = $this->msg( $wgContLang->lc( $this->getName() ) . '-helppage' );
+               $msg = $this->msg(
+                       MediaWikiServices::getInstance()->getContentLanguage()->lc( $this->getName() ) .
+                       '-helppage' );
 
                if ( !$msg->isDisabled() ) {
                        $helpUrl = Skin::makeUrl( $msg->plain() );