* (bug 1015) this fix enables the full wikisyntax inside <gallery> captions
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 26 Mar 2005 18:55:10 +0000 (18:55 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 26 Mar 2005 18:55:10 +0000 (18:55 +0000)
includes/Parser.php

index e4bd863..49609aa 100644 (file)
@@ -2872,6 +2872,10 @@ class Parser
         * 'A tree'.
         */
        function renderImageGallery( $text ) {
+               # Setup the parser
+               global $wgUser, $wgParser, $wgTitle;
+               $parserOptions = ParserOptions::newFromUser( $wgUser );
+       
                global $wgLinkCache;
                $ig = new ImageGallery();
                $ig->setShowBytes( false );
@@ -2897,9 +2901,8 @@ class Parser
                                $label = '';
                        }
                        
-                       # FIXME: Use the full wiki parser and add its links
-                       # to the page's links.
-                       $html = $this->mOptions->mSkin->formatComment( $label );
+                       $html = $wgParser->parse( $label , $wgTitle, $parserOptions );
+                       $html = $html->mText;
                        
                        $ig->add( Image::newFromTitle( $nt ), $html );
                        $wgLinkCache->addImageLinkObj( $nt );