Merge "ParserOutput::addLanguageLink needs a string"
[lhc/web/wiklou.git] / includes / SpecialPage.php
index 816831f..e844d93 100644 (file)
@@ -254,13 +254,14 @@ class SpecialPage {
         *
         * @param $name String
         * @param $subpage String|Bool subpage string, or false to not use a subpage
+        * @param $fragment String the link fragment (after the "#")
         * @throws MWException
         * @return Title object
         */
-       public static function getTitleFor( $name, $subpage = false ) {
+       public static function getTitleFor( $name, $subpage = false, $fragment = '' ) {
                $name = SpecialPageFactory::getLocalNameFor( $name, $subpage );
                if ( $name ) {
-                       return Title::makeTitle( NS_SPECIAL, $name );
+                       return Title::makeTitle( NS_SPECIAL, $name, $fragment );
                } else {
                        throw new MWException( "Invalid special page name \"$name\"" );
                }
@@ -513,6 +514,19 @@ class SpecialPage {
                return false;
        }
 
+       /**
+        * Is this page cached?
+        * Expensive pages are cached or disabled in miser mode.
+        * Used by QueryPage and subclasses, moved here so that
+        * Special:SpecialPages can safely call it for all special pages.
+        *
+        * @return Boolean
+        * @since 1.21
+        */
+       public function isCached() {
+               return false;
+       }
+
        /**
         * Can be overridden by subclasses with more complicated permissions
         * schemes.