Merge "CatWatch don't show the number of pages transcluded"
[lhc/web/wiklou.git] / includes / Title.php
index 0ac3e46..f4a6894 100644 (file)
@@ -145,7 +145,7 @@ class Title implements LinkTarget {
        /** @var bool The (string) language code of the page's language and content code. */
        private $mPageLanguage = false;
 
-       /** @var string|boolean|null The page language code from the database, null if not saved in
+       /** @var string|bool|null The page language code from the database, null if not saved in
         * the database or false if not loaded, yet. */
        private $mDbPageLanguage = false;
 
@@ -572,57 +572,6 @@ class Title implements LinkTarget {
                return $title;
        }
 
-       /**
-        * Extract a redirect destination from a string and return the
-        * Title, or null if the text doesn't contain a valid redirect
-        * This will only return the very next target, useful for
-        * the redirect table and other checks that don't need full recursion
-        *
-        * @param string $text Text with possible redirect
-        * @return Title The corresponding Title
-        * @deprecated since 1.21, use Content::getRedirectTarget instead.
-        */
-       public static function newFromRedirect( $text ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               $content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
-               return $content->getRedirectTarget();
-       }
-
-       /**
-        * Extract a redirect destination from a string and return the
-        * Title, or null if the text doesn't contain a valid redirect
-        * This will recurse down $wgMaxRedirects times or until a non-redirect target is hit
-        * in order to provide (hopefully) the Title of the final destination instead of another redirect
-        *
-        * @param string $text Text with possible redirect
-        * @return Title
-        * @deprecated since 1.21, use Content::getUltimateRedirectTarget instead.
-        */
-       public static function newFromRedirectRecurse( $text ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               $content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
-               return $content->getUltimateRedirectTarget();
-       }
-
-       /**
-        * Extract a redirect destination from a string and return an
-        * array of Titles, or null if the text doesn't contain a valid redirect
-        * The last element in the array is the final destination after all redirects
-        * have been resolved (up to $wgMaxRedirects times)
-        *
-        * @param string $text Text with possible redirect
-        * @return Title[] Array of Titles, with the destination last
-        * @deprecated since 1.21, use Content::getRedirectChain instead.
-        */
-       public static function newFromRedirectArray( $text ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               $content = ContentHandler::makeContent( $text, null, CONTENT_MODEL_WIKITEXT );
-               return $content->getRedirectChain();
-       }
-
        /**
         * Get the prefixed DB key associated with an ID
         *
@@ -2452,8 +2401,8 @@ class Title implements LinkTarget {
 
        /**
         * Can $user perform $action on this page? This is an internal function,
-        * which checks ONLY that previously checked by userCan (i.e. it leaves out
-        * checks on wfReadOnly() and blocks)
+        * with multiple levels of checks depending on performance needs; see $rigor below.
+        * It does not check wfReadOnly().
         *
         * @param string $action Action that permission needs to be checked for
         * @param User $user User to check
@@ -3570,9 +3519,9 @@ class Title implements LinkTarget {
 
                // If we are looking at a css/js user subpage, purge the action=raw.
                if ( $this->isJsSubpage() ) {
-                       $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/javascript' );
+                       $urls[] = $this->getInternalURL( 'action=raw&ctype=text/javascript' );
                } elseif ( $this->isCssSubpage() ) {
-                       $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/css' );
+                       $urls[] = $this->getInternalURL( 'action=raw&ctype=text/css' );
                }
 
                Hooks::run( 'TitleSquidURLs', [ $this, &$urls ] );
@@ -4627,7 +4576,7 @@ class Title implements LinkTarget {
         * to true in LocalSettings.php, otherwise returns false. If there is no language saved in
         * the db, it will return NULL.
         *
-        * @return string|null|boolean
+        * @return string|null|bool
         */
        private function getDbPageLanguageCode() {
                global $wgPageLanguageUseDB;