require __DIR__ . '/includes/WebStart.php';
# Set action base paths so that WebRequest::getPathInfo()
require __DIR__ . '/includes/WebStart.php';
# Set action base paths so that WebRequest::getPathInfo()
if ( !$title instanceof Title ) { // files have valid titles
wfForbidden( 'img-auth-accessdenied', 'img-auth-badtitle', $name );
return;
if ( !$title instanceof Title ) { // files have valid titles
wfForbidden( 'img-auth-accessdenied', 'img-auth-badtitle', $name );
return;
if ( !$permissionManager->userCan( 'read', $user, $title ) ) {
wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $name );
if ( !$permissionManager->userCan( 'read', $user, $title ) ) {
wfForbidden( 'img-auth-accessdenied', 'img-auth-noread', $name );
wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." );
$repo->streamFileWithStatus( $filename, $headers, $options );
}
wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." );
$repo->streamFileWithStatus( $filename, $headers, $options );
}