Subversion Repositories xrowsecuredfiles

Compare Revisions

Ignore whitespace Rev 2 → Rev 3

/trunk/extension/xrowsecuredfiles/modules/files/view.php
11,8 → 11,6
$user = eZUser::currentUser();
$access = $user->hasAccessTo( 'files', 'read' );
 
 
 
if ( $access['accessWord'] == 'no' )
{
return $Module->handleError( eZError::KERNEL_ACCESS_DENIED, 'kernel' );
46,16 → 44,17
# extract "files/view"
$url->params = array_slice( $url->getParams(), 3 );
 
$query = $url->getQuery();
$url->setQuery( array() );
 
$uri = $url->buildUrl();
 
if ( empty( $uri ) or $uri == '/' )
{
return $Module->handleError( eZError::KERNEL_ACCESS_DENIED, 'kernel' );
}
 
$file = xrowSecuredFilesTool::directory() . '/' . $directory . '/' . $uri;
eZClusterFileHandler::instance();
//@TODO fix for siteaccess prepended urls
$file = xrowSecuredFilesTool::directory() . '/' . $directory . $uri;
 
//End with file download
eZFile::download($file, false );