From: Jens Frank Date: Tue, 7 Dec 2004 23:44:04 +0000 (+0000) Subject: (bug 1016) Fix handling of lines omitting Image: in a tag X-Git-Tag: 1.5.0alpha1~1127 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=5c63ca6e21fb9f6ef09904db59eade425b494a05;p=lhc%2Fweb%2Fwiklou.git (bug 1016) Fix handling of lines omitting Image: in a tag --- diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 2b33d54e01..acbfc9b95b 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -90,6 +90,15 @@ class ImageGallery $name = $img->getName(); $nt = $img->getTitle(); + // Not an image. Just print the name and skip. + if ( $nt->getNamespace() != NS_IMAGE ) { + $s .= '' . + $nt->getText() . '' . (($i%4==3) ? "\n" : ''); + $i++; + + continue; + } + //TODO //$ul = $sk->makeLink( $wgContLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut );