* (bug 28719) Do not call mLinkHolders __destruct explicitly
* (bug 21196) Article::getContributors() no longer fails on PostgreSQL.
* (bug 28752) XCache doesn't work in CLI mode.
-* (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles
+* (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles
+* (bug 22227) Special:Listfiles no longer throws an error on bogus file entries
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result.
if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' );
$filePage = Title::makeTitle( NS_FILE, $value );
- $link = $this->getSkin()->linkKnown( $filePage, htmlspecialchars( $filePage->getText() ) );
- $image = wfLocalFile( $value );
- $url = $image->getURL();
- $download = Xml::element('a', array( 'href' => $url ), $imgfile );
- return "$link ($download)";
+ if( $filePage ) {
+ $link = $this->getSkin()->linkKnown( $filePage, htmlspecialchars( $filePage->getText() ) );
+ $download = Xml::element( 'a',
+ array( 'href' => wfLocalFile( $filePage )->getURL() ),
+ $imgfile
+ );
+ return "$link ($download)";
+ } else {
+ return htmlspecialchars( $value );
+ }
case 'img_user_text':
if ( $this->mCurrentRow->img_user ) {
$link = $this->getSkin()->link(
case 'img_description':
return $this->getSkin()->commentBlock( $value, null, false, false );
case 'count':
- return intval($value)+1;
+ return intval( $value ) + 1;
}
}