$user = $this->getUser();
// Check blocks
- if ( $user->isBlocked() ) {
- throw new UserBlockedError( $user->getBlock() );
+ // @TODO Use PermissionManager::isBlockedFrom() instead.
+ $block = $user->getBlock();
+ if ( $block ) {
+ throw new UserBlockedError( $block );
}
$this->setHeaders();
$key = $oimage->getStorageKey();
$path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key;
- $repo->streamFile( $path );
+ $repo->streamFileWithStatus( $path );
}
/**