Kill some more mysql 4 related things from the installer
[lhc/web/wiklou.git] / includes / ImagePage.php
index fb25284..a599ab7 100644 (file)
@@ -332,9 +332,13 @@ class ImagePage extends Article {
                                                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();
@@ -417,7 +421,7 @@ class ImagePage extends Article {
                                                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 {
@@ -784,20 +788,14 @@ EOT
         * 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();
        }
 
@@ -988,7 +986,7 @@ class ImageHistoryList {
                                        array(
                                                'action' => 'revert',
                                                'oldimage' => $img,
-                                               'wpEditToken' => $wgUser->editToken( $img )
+                                               'wpEditToken' => $wgUser->getEditToken( $img )
                                        ),
                                        array( 'known', 'noclasses' )
                                );
@@ -1016,7 +1014,7 @@ class ImageHistoryList {
                                        array(
                                                'target' => $this->title->getPrefixedText(),
                                                'file' => $img,
-                                               'token' => $wgUser->editToken( $img )
+                                               'token' => $wgUser->getEditToken( $img )
                                        ),
                                        array( 'known', 'noclasses' )
                                );
@@ -1060,7 +1058,7 @@ class ImageHistoryList {
                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;