* Made a Imagelist a bit narrower, still too wide
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 5 May 2007 20:09:52 +0000 (20:09 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 5 May 2007 20:09:52 +0000 (20:09 +0000)
includes/SpecialImagelist.php
languages/messages/MessagesEn.php

index 92b9ae1..59fc78f 100644 (file)
@@ -57,7 +57,6 @@ class ImageListPager extends TablePager {
        function getFieldNames() {
                if ( !$this->mFieldNames ) {
                        $this->mFieldNames = array(
-                               'links' => '',
                                'img_timestamp' => wfMsg( 'imagelist_date' ),
                                'img_name' => wfMsg( 'imagelist_name' ),
                                'img_user_text' => wfMsg( 'imagelist_user' ),
@@ -75,7 +74,6 @@ class ImageListPager extends TablePager {
 
        function getQueryInfo() {
                $fields = $this->getFieldNames();
-               unset( $fields['links'] );
                $fields = array_keys( $fields );
                $fields[] = 'img_user';
                return array(
@@ -112,17 +110,13 @@ class ImageListPager extends TablePager {
        function formatValue( $field, $value ) {
                global $wgLang;
                switch ( $field ) {
-                       case 'links':
-                               $name = $this->mCurrentRow->img_name;
-                               $ilink = "<a href=\"" . htmlspecialchars( Image::imageUrl( $name ) ) .
-                                 "\">" . $this->mMessages['imgfile'] . "</a>";
-                               $desc = $this->getSkin()->makeKnownLinkObj( Title::makeTitle( NS_IMAGE, $name ),
-                                       $this->mMessages['imgdesc'] );
-                               return "$desc | $ilink";
                        case 'img_timestamp':
                                return $wgLang->timeanddate( $value, true );
                        case 'img_name':
-                               return htmlspecialchars( $value );
+                               $name = $this->mCurrentRow->img_name;
+                               $link = $this->getSkin()->makeKnownLinkObj( Title::makeTitle( NS_IMAGE, $name ), $value );
+                               $download = Xml::element('a', array( "href" => Image::imageUrl( $name ) ), $this->mMessages['imgfile'] );
+                               return "$link ($download)";
                        case 'img_user_text':
                                if ( $this->mCurrentRow->img_user ) {
                                        $link = $this->getSkin()->makeLinkObj( Title::makeTitle( NS_USER, $value ), 
@@ -132,7 +126,7 @@ class ImageListPager extends TablePager {
                                }
                                return $link;
                        case 'img_size':
-                               return $wgLang->formatNum( $value );
+                               return $this->getSkin()->formatSize( $value );
                        case 'img_description':
                                return $this->getSkin()->commentBlock( $value );
                }
index c774fa2..5f55523 100644 (file)
@@ -1463,7 +1463,7 @@ this old version, (rev) = revert to this old version.
 'imagelist_date' => 'Date',
 'imagelist_name' => 'Name',
 'imagelist_user' => 'User',
-'imagelist_size' => 'Size (bytes)',
+'imagelist_size' => 'Size',
 'imagelist_description' => 'Description',
 'imagelist_search_for' => 'Search for image name:',