Add SpecialPage::getLinkRenderer()
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 6c84623..65dde21 100644 (file)
@@ -2296,13 +2296,9 @@ class Parser {
                                                # cloak any absolute URLs inside the image markup, so replaceExternalLinks() won't touch them
                                                $s .= $prefix . $this->armorLinks(
                                                        $this->makeImage( $nt, $text, $holders ) ) . $trail;
-                                       } else {
-                                               $s .= $prefix . $trail;
+                                               continue;
                                        }
-                                       continue;
-                               }
-
-                               if ( $ns == NS_CATEGORY ) {
+                               } elseif ( $ns == NS_CATEGORY ) {
                                        $s = rtrim( $s . "\n" ); # bug 87
 
                                        if ( $wasblank ) {
@@ -3151,7 +3147,7 @@ class Parser {
                                                $context->setUser( User::newFromName( '127.0.0.1', false ) );
                                        }
                                        $context->setLanguage( $this->mOptions->getUserLangObj() );
-                                       $ret = SpecialPageFactory::capturePath( $title, $context );
+                                       $ret = SpecialPageFactory::capturePath( $title, $context, $this->getLinkRenderer() );
                                        if ( $ret ) {
                                                $text = $context->getOutput()->getHTML();
                                                $this->mOutput->addOutputPageMetadata( $context->getOutput() );
@@ -5302,6 +5298,7 @@ class Parser {
        /**
         * Set a flag in the output object indicating that the content is dynamic and
         * shouldn't be cached.
+        * @deprecated since 1.28; use getOutput()->updateCacheExpiry()
         */
        public function disableCache() {
                wfDebug( "Parser output marked as uncacheable.\n" );