// Is this a thumb of an archived file?
$isOld = (isset( $params['archived'] ) && $params['archived']);
// Is this a thumb of an archived file?
$isOld = (isset( $params['archived'] ) && $params['archived']);
$bits = explode( '!', $fileName, 2 );
if( !isset($bits[1]) ) {
wfThumbError( 404, wfMsg( 'badtitletext' ) );
$bits = explode( '!', $fileName, 2 );
if( !isset($bits[1]) ) {
wfThumbError( 404, wfMsg( 'badtitletext' ) );
return;
}
$title = Title::makeTitleSafe( NS_FILE, $bits[1] );
if( is_null($title) ) {
wfThumbError( 404, wfMsg( 'badtitletext' ) );
return;
}
$title = Title::makeTitleSafe( NS_FILE, $bits[1] );
if( is_null($title) ) {
wfThumbError( 404, wfMsg( 'badtitletext' ) );
if ( !$img->getTitle()->userCanRead() ) {
wfThumbError( 403, 'Access denied. You do not have permission to access ' .
'the source file.' );
if ( !$img->getTitle()->userCanRead() ) {
wfThumbError( 403, 'Access denied. You do not have permission to access ' .
'the source file.' );
return;
}
$sourcePath = $img->getPath();
if ( $sourcePath === false ) {
wfThumbError( 500, 'The source file is not locally accessible.' );
return;
}
$sourcePath = $img->getPath();
if ( $sourcePath === false ) {
wfThumbError( 500, 'The source file is not locally accessible.' );
return;
}
}
} catch ( MWException $e ) {
wfThumbError( 500, $e->getHTML() );
return;
}
}
} catch ( MWException $e ) {
wfThumbError( 500, $e->getHTML() );
$errorMsg = wfMsgHtml( 'thumbnail_error', 'Image was not scaled, ' .
'is the requested width bigger than the source?' );
} else {
$errorMsg = wfMsgHtml( 'thumbnail_error', 'Image was not scaled, ' .
'is the requested width bigger than the source?' );
} else {
}
if ( $errorMsg !== false ) {
wfThumbError( 500, $errorMsg );
}
if ( $errorMsg !== false ) {
wfThumbError( 500, $errorMsg );