Left alignment gives a better look to the Reason box.
[lhc/web/wiklou.git] / includes / ImagePage.php
index cd516d6..e68fbfa 100644 (file)
@@ -157,7 +157,7 @@ class ImagePage extends Article {
        }
 
        function openShowImage() {
-               global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang;
+               global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang, $wgContLang;
 
                $full_url  = $this->img->getURL();
                $linkAttribs = false;
@@ -176,6 +176,7 @@ class ImagePage extends Article {
                $maxWidth = $max[0];
                $maxHeight = $max[1];
                $sk = $wgUser->getSkin();
+               $dirmark = $wgContLang->getDirMark();
 
                if ( $this->img->exists() ) {
                        # image
@@ -219,7 +220,7 @@ class ImagePage extends Article {
                                        }
                                        $msgbig  = wfMsgHtml( 'show-big-image' );
                                        $msgsmall = wfMsgExt( 'show-big-image-thumb',
-                                               array( 'parseinline' ), $width, $height );
+                                               array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) );
                                } else {
                                        # Image is small enough to show full size on image page
                                        $msgbig = htmlspecialchars( $this->img->getName() );
@@ -235,21 +236,20 @@ class ImagePage extends Article {
                                } else {
                                        $anchorclose .= 
                                                $msgsmall .
-                                               '<br />' . Xml::tags( 'a', $linkAttribs,  $msgbig ) . ' ' . $longDesc;
+                                               '<br />' . Xml::tags( 'a', $linkAttribs,  $msgbig ) . "$dirmark " . $longDesc;
                                }
 
                                if ( $this->img->isMultipage() ) {
                                        $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
                                }
 
-                               $imgAttribs = array(
-                                       'border' => 0,
-                                       'alt' => $this->img->getTitle()->getPrefixedText()
-                               );
-
                                if ( $thumbnail ) {
+                                       $options = array( 
+                                               'alt' => $this->img->getTitle()->getPrefixedText(),
+                                               'file-link' => true,
+                                       );
                                        $wgOut->addHTML( '<div class="fullImageLink" id="file">' . 
-                                               $thumbnail->toHtml( $imgAttribs, $linkAttribs ) .
+                                               $thumbnail->toHtml( $options ) .
                                                $anchorclose . '</div>' );
                                }
 
@@ -297,9 +297,9 @@ class ImagePage extends Article {
                                if ($this->img->isSafeFile()) {
                                        $icon= $this->img->iconThumb();
 
-                                       $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
-                                       $icon->toHtml() .
-                                       '</a></div>' );
+                                       $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
+                                       $icon->toHtml( array( 'desc-link' => true ) ) .
+                                       '</div>' );
                                }
 
                                $showLink = true;
@@ -309,8 +309,6 @@ class ImagePage extends Article {
                        if ($showLink) {
                                $filename = wfEscapeWikiText( $this->img->getName() );
 
-                               global $wgContLang;
-                               $dirmark = $wgContLang->getDirMark();
                                if (!$this->img->isSafeFile()) {
                                        $warning = wfMsg( 'mediawarning' );
                                        $wgOut->addWikiText( <<<EOT