r25875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25874‎ | r25875 | r25876 >
Date:23:31, 15 September 2007
Author:laner
Status:old
Tags:
Comment:
Fixed compatibility with MediaWiki 1.10 and below.
Modified paths:
  • /trunk/extensions/SmoothGallery/SmoothGallery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SmoothGallery/SmoothGallery.php
@@ -77,6 +77,7 @@
7878 function renderSmoothGallery( $input, $argv, &$parser ) {
7979 global $wgContLang, $wgUser, $wgTitle;
8080 global $wgSmoothGalleryDelimiter;
 81+ global $wgVersion;
8182
8283 $skin = $wgUser->getSkin();
8384
@@ -299,7 +300,11 @@
300301
301302 $output .= '</div>';
302303
303 - $plain_gallery->add( $img_obj->getTitle() ); //TODO: use text
 304+ if ( version_compare( $wgVersion, "1.11", '<' ) ) {
 305+ $plain_gallery->add( $img_obj ); //TODO: use text
 306+ } else {
 307+ $plain_gallery->add( $img_obj->getTitle() ); //TODO: use text
 308+ }
304309 }
305310
306311 //Make sure we have something to output

Status & tagging log