center -\> span, empty alt tag added (todo: span with class, fill alt tag)
authorGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 9 Apr 2004 14:57:05 +0000 (14:57 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 9 Apr 2004 14:57:05 +0000 (14:57 +0000)
includes/ImagePage.php

index 4373462..c805667 100644 (file)
@@ -26,7 +26,7 @@ class ImagePage extends Article {
 
        function openShowImage()
        {
-               global $wgOut, $wgUser;
+               global $wgOut, $wgUser,$wgRequest;
                $name = $this->mTitle->getText();
                $path = wfImagePath( $name );
                $url   = wfImageUrl( $name );
@@ -38,9 +38,10 @@ class ImagePage extends Article {
                        
                        if ( $type != "" ) {
                                # image
-                               $s = "<center><img src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" /></center>";
+                               $s = "<span style=\"text-align: center\"><img src=\"{$url}\" width=\"{$width}\" height=\"{$height}\"".
+                               "alt=\"".$wgRequest->getVal( 'image' )."\" /></span>";
                        } else {
-                               $s = "<center>".$sk->makeMediaLink($name,"")."</center>";
+                               $s = "<span style=\"text-align: center\">".$sk->makeMediaLink($name,"")."</span>";
                        }
                        $wgOut->addHTML( $s );
                }