Fix bug 77: semicolon-colon wikitext syntax requires extra space now;
[lhc/web/wiklou.git] / includes / ImagePage.php
index 2ed1cf3..1668197 100644 (file)
@@ -57,16 +57,16 @@ class ImagePage extends Article {
                                # image
                                $width = $this->img->getWidth();
                                $height = $this->img->getHeight();
+                               $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
                                if ( $width > $maxWidth && $wgUseImageResize ) {
-                                       $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
                                        $anchoropen  = "<a href=\"{$url}\">";
                                        $anchorclose = "<br>{$msg}</a>";
 
                                        $url = $this->img->createThumb( $maxWidth );
                                        $height = floor( $height * $maxWidth / $width );
                                        $width  = $maxWidth;
-                               } elseif ( $height > $maxHeight && $wgUseImageResize ) {
-                                       $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
+                               } 
+                               if ( $height > $maxHeight && $wgUseImageResize ) {
                                        $anchoropen  = "<a href=\"{$url}\">";
                                        $anchorclose = "<br>{$msg}</a>";
 
@@ -192,7 +192,7 @@ class ImagePage extends Article {
 
        function doDelete()
        {
-               global $wgOut, $wgUser, $wgLang, $wgRequest;
+               global $wgOut, $wgUser, $wgContLang, $wgRequest;
                global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList;
                $fname = 'ImagePage::doDelete';
 
@@ -253,7 +253,7 @@ class ImagePage extends Article {
                        # Image itself is now gone, and database is cleaned.
                        # Now we remove the image description page.
 
-                       $nt = Title::newFromText( $wgLang->getNsText( Namespace::getImage() ) . ":" . $image );
+                       $nt = Title::newFromText( $wgContLang->getNsText( Namespace::getImage() ) . ":" . $image );
                        $article = new Article( $nt );
                        $article->doDeleteArticle( $reason ); # ignore errors
 
@@ -264,7 +264,7 @@ class ImagePage extends Article {
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
 
                $sk = $wgUser->getSkin();
-               $loglink = $sk->makeKnownLink( $wgLang->getNsText(
+               $loglink = $sk->makeKnownLink( $wgContLang->getNsText(
                  Namespace::getWikipedia() ) .
                  ':' . wfMsg( 'dellogpage' ), wfMsg( 'deletionlog' ) );