* (bug 10265) Fix regression in category image gallery paging
[lhc/web/wiklou.git] / includes / ImageGallery.php
index 6045ad6..19f1b57 100644 (file)
@@ -147,6 +147,10 @@ class ImageGallery
        * @param $html  String:  Additional HTML text to be shown. The name and size of the image are always shown.
        */
        function insert( $title, $html='' ) {
+               if ( $title instanceof File ) {
+                       // Old calling convention
+                       $title = $title->getTitle();
+               }
                array_unshift( $this->mImages, array( &$title, $html ) );
        }