From: Brion Vibber Date: Thu, 9 Dec 2004 02:13:00 +0000 (+0000) Subject: Merge image gallery fixlets from 1.4 X-Git-Tag: 1.5.0alpha1~1122 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=e6bb9de12b4ca0ee0d2d33cebf610fb2a274b484;p=lhc%2Fweb%2Fwiklou.git Merge image gallery fixlets from 1.4 --- diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 33be587aa9..44177d62a8 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -33,10 +33,10 @@ class ImageGallery * Add an image to the gallery. * * @param Image $image Image object that is added to the gallery - * @param string $text Additional text to be shown. The name and size of the image are always shown. + * @param string $html Additional HTML text to be shown. The name and size of the image are always shown. */ - function add( $image, $text='' ) { - $this->mImages[] = array( &$image, $text ); + function add( $image, $html='' ) { + $this->mImages[] = array( &$image, $html ); } /** @@ -123,7 +123,7 @@ class ImageGallery ''. '
' . $sk->makeKnownLinkObj( $nt, '' ) . '
' . - $textlink . htmlspecialchars( $text ) . $nb; + $textlink . $text . $nb; $s .= "\n" . (($i%4==3) ? "\n" : ''); diff --git a/includes/Parser.php b/includes/Parser.php index 9477b66f6f..0e911d6c92 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3106,7 +3106,12 @@ class Parser } else { $label = ''; } - $ig->add( Image::newFromTitle( $nt ), $label ); + + # FIXME: Use the full wiki parser and add its links + # to the page's links. + $html = $this->mOptions->mSkin->formatComment( $label ); + + $ig->add( Image::newFromTitle( $nt ), $html ); $wgLinkCache->addImageLinkObj( $nt ); } return $ig->toHTML();