To preserve backwards compatibility, the right thing to do IMO would be to just add &$this as a second param:
wfRunHooks( 'UploadComplete', array( &$img, &$this ) );
-- Jim R. Wilson (jimbojw)
On Jan 15, 2008 2:07 PM, Travis Derouin travis@wikihow.com wrote:
Would it make sense to change the calling of this hook from:
$img = null; // @todo: added to avoid passing a ref to null - should this be defined somewhere? wfRunHooks( 'UploadComplete', array( &$img ) );
to
wfRunHooks( 'UploadComplete', array( &$this ) );
This would pass in the UploadForm which has a lot of useful variables for callers to use. It would help the MultiUpload extension I've written so it can show a thumbnail of the successfully uploaded file
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l