Index: branches/filerepo-work/phase3/includes/ImageGallery.php |
— | — | @@ -131,6 +131,10 @@ |
132 | 132 | * @param $html String: additional HTML text to be shown. The name and size of the image are always shown. |
133 | 133 | */ |
134 | 134 | function add( $title, $html='' ) { |
| 135 | + if ( $title instanceof File ) { |
| 136 | + // Old calling convention |
| 137 | + $title = $title->getTitle(); |
| 138 | + } |
135 | 139 | $this->mImages[] = array( $title, $html ); |
136 | 140 | wfDebug( "ImageGallery::add " . $title->getText() . "\n" ); |
137 | 141 | } |