r22512 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22511‎ | r22512 | r22513 >
Date:19:24, 28 May 2007
Author:tstarling
Status:old
Tags:
Comment:
Backwards compatibility for add()
Modified paths:
  • /branches/filerepo-work/phase3/includes/ImageGallery.php (modified) (history)

Diff [purge]

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