diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
commit | 8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch) | |
tree | cd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /includes/SpecialImagelist.php | |
parent | d7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff) |
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'includes/SpecialImagelist.php')
-rw-r--r-- | includes/SpecialImagelist.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index 92b9ae11..1688fe7c 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -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,15 @@ 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 ); + $image = wfLocalFile( $value ); + $url = $image->getURL(); + $download = Xml::element('a', array( "href" => $url ), $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 +128,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 ); } @@ -167,4 +163,4 @@ class ImageListPager extends TablePager { } } -?> + |