From 98b50e1c001ace75d7e1f867cc3a93cb481e646f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 26 Mar 2005 18:55:10 +0000 Subject: [PATCH] * (bug 1015) this fix enables the full wikisyntax inside captions --- includes/Parser.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index e4bd863316..49609aadd7 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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 ); -- 2.20.1