- $skip = $time = $sha1 = $descQuery = false;
- wfRunHooks( 'BeforeParserMakeImageLinkObj',
- array( &$this, &$nt, &$skip, &$time, &$descQuery, &$sha1 ) );
- if ( $skip ) {
- $this->mOutput->addImage( $nt->getDBkey(), null, null ); // register
- $link = $sk->link( $nt );
- } else {
- # Fetch and register the file (file title may be different via hooks)
- list( $file, $nt ) = $this->fetchFileAndTitle( $nt, $time, $sha1 );
- $link = $sk->makeMediaLinkFile( $nt, $file, $text );
- }
+ $time = $sha1 = $descQuery = false;
+ wfRunHooks( 'BeforeParserFetchFileAndTitle',
+ array( &$this, &$nt, &$time, &$sha1, &$descQuery ) );
+ # Fetch and register the file (file title may be different via hooks)
+ list( $file, $nt ) = $this->fetchFileAndTitle( $nt, $time, $sha1 );