Index: trunk/extensions/SmoothGallery/SmoothGallery.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | function renderSmoothGallery( $input, $argv, &$parser ) { |
79 | 79 | global $wgContLang, $wgUser, $wgTitle; |
80 | 80 | global $wgSmoothGalleryDelimiter; |
| 81 | + global $wgVersion; |
81 | 82 | |
82 | 83 | $skin = $wgUser->getSkin(); |
83 | 84 | |
— | — | @@ -299,7 +300,11 @@ |
300 | 301 | |
301 | 302 | $output .= '</div>'; |
302 | 303 | |
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 | + } |
304 | 309 | } |
305 | 310 | |
306 | 311 | //Make sure we have something to output |