rawParams( $this->makeSizeLink( $params, $width, $height ) )->
parse() . ' ' .
Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ),
- wfMessage( 'show-big-image-other' )->
- rawParams( $wgLang->pipeList( $otherSizes ), count( $otherSizes ) )->parse()
+ wfMessage( 'show-big-image-other' )->rawParams( $wgLang->pipeList( $otherSizes ) )->
+ params( count( $otherSizes ) )->parse()
);
+ } elseif ( $width == 0 && $height == 0 ){
+ # Some sort of audio file that doesn't have dimensions
+ # Don't output a no hi res message for such a file
+ $msgsmall = '';
} else {
# Image is small enough to show full size on image page
$msgsmall = wfMessage( 'file-nohires' )->parse();
wfMsgExt( 'imgmultigoto', array( 'parseinline', 'replaceafter' ), $select ) .
Xml::submitButton( wfMsg( 'imgmultigo' ) ) .
Xml::closeElement( 'form' ) .
- "<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>"
+ "<hr />$thumb1\n$thumb2<br style=\"clear: both\" /></div></td></tr></table>"
);
}
} else {
* Delete the file, or an earlier version of it
*/
public function delete() {
- global $wgUploadMaintenance;
- if ( $wgUploadMaintenance && $this->getTitle() && $this->getTitle()->getNamespace() == NS_FILE ) {
- global $wgOut;
- $wgOut->wrapWikiMsg( "<div class='error'>\n$1\n</div>\n", array( 'filedelete-maintenance' ) );
- return;
- }
-
- $this->loadFile();
- if ( !$this->mPage->getFile()->exists() || !$this->mPage->getFile()->isLocal() || $this->mPage->getFile()->getRedirected() ) {
+ $file = $this->mPage->getFile();
+ if ( !$file->exists() || !$file->isLocal() || $file->getRedirected() ) {
// Standard article deletion
parent::delete();
return;
}
- $deleter = new FileDeleteForm( $this->mPage->getFile() );
+
+ $deleter = new FileDeleteForm( $file );
$deleter->execute();
}
array(
'action' => 'revert',
'oldimage' => $img,
- 'wpEditToken' => $wgUser->editToken( $img )
+ 'wpEditToken' => $wgUser->getEditToken( $img )
),
array( 'known', 'noclasses' )
);
array(
'target' => $this->title->getPrefixedText(),
'file' => $img,
- 'token' => $wgUser->editToken( $img )
+ 'token' => $wgUser->getEditToken( $img )
),
array( 'known', 'noclasses' )
);
if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
$row .= '<td><span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span></td>';
} else {
- $row .= '<td dir="' . $wgContLang->getDir() . '">' . Linker::commentBlock( $description, $this->title ) . '</td>';
+ $row .= '<td dir="' . $wgContLang->getDir() . '">' . Linker::formatComment( $description, $this->title ) . '</td>';
}
$rowClass = null;