Merge "Add 2 FIXMEs about confusingly named functions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 14 Feb 2016 16:33:26 +0000 (16:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 14 Feb 2016 16:33:26 +0000 (16:33 +0000)
1  2 
includes/Title.php

diff --combined includes/Title.php
@@@ -161,9 -161,9 +161,9 @@@ class Title implements LinkTarget 
         * Avoid usage of this singleton by using TitleValue
         * and the associated services when possible.
         *
 -       * @return TitleParser
 +       * @return MediaWikiTitleCodec
         */
 -      private static function getTitleParser() {
 +      private static function getMediaWikiTitleCodec() {
                global $wgContLang, $wgLocalInterwikis;
  
                static $titleCodec = null;
         * @return TitleFormatter
         */
        private static function getTitleFormatter() {
 -              // NOTE: we know that getTitleParser() returns a MediaWikiTitleCodec,
 +              // NOTE: we know that getMediaWikiTitleCodec() returns a MediaWikiTitleCodec,
                //      which implements TitleFormatter.
 -              return self::getTitleParser();
 +              return self::getMediaWikiTitleCodec();
        }
  
        function __construct() {
         * show "inactive" CSS or JS.
         *
         * @return bool
+        * @todo FIXME: Rename to isSiteConfigPage() and remove deprecated hook
         */
        public function isCssOrJsPage() {
                $isCssOrJsPage = NS_MEDIAWIKI == $this->mNamespace
        /**
         * Is this a .css or .js subpage of a user page?
         * @return bool
+        * @todo FIXME: Rename to isUserConfigPage()
         */
        public function isCssJsSubpage() {
                return ( NS_USER == $this->mNamespace && $this->isSubpage()
                // @note: splitTitleString() is a temporary hack to allow MediaWikiTitleCodec to share
                //        the parsing code with Title, while avoiding massive refactoring.
                // @todo: get rid of secureAndSplit, refactor parsing code.
 -              $titleParser = self::getTitleParser();
 +              $titleParser = self::getMediaWikiTitleCodec();
                // MalformedTitleException can be thrown here
                $parts = $titleParser->splitTitleString( $dbkey, $this->getDefaultNamespace() );