added: to mount points: file systems
we have two file systems now: - simplefs - the files stored on the hard drive have the same structure as in the database (dir1/dir2/file) - hashfs - files are stored in special directories extented: the mountparser can read file system added: function download this is a default function for items which have static content git-svn-id: svn://ttmath.org/publicrep/winix/trunk@588 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -46,6 +46,9 @@ return true;
|
||||
|
||||
void Content::SetDefaultFunctionForFile()
|
||||
{
|
||||
if( request.item.static_auth != Item::static_none )
|
||||
request.pfunction = data.functions.GetFunction(FUN_DOWNLOAD);
|
||||
else
|
||||
if( request.HasReadExecAccess(request.item) )
|
||||
request.pfunction = data.functions.GetFunction(FUN_RUN);
|
||||
else
|
||||
@@ -223,6 +226,9 @@ void Content::MakeStandardFunction()
|
||||
else
|
||||
if( request.pfunction->code == FUN_CHOWN )
|
||||
FunPriv();
|
||||
else
|
||||
if( request.pfunction->code == FUN_DOWNLOAD )
|
||||
FunDownload();
|
||||
else
|
||||
request.status = Error::permission_denied;
|
||||
|
||||
@@ -309,7 +315,13 @@ void Content::MakePage()
|
||||
{
|
||||
bool sent = false;
|
||||
|
||||
if( request.is_item && request.item.content_type == Item::ct_raw && request.status == Error::ok && request.pfunction )
|
||||
if( !request.redirect_to.empty() ||
|
||||
!request.x_sendfile.empty() )
|
||||
return;
|
||||
|
||||
|
||||
if( request.is_item && request.item.static_auth == Item::static_none &&
|
||||
request.item.content_type == Item::ct_raw && request.status == Error::ok && request.pfunction )
|
||||
{
|
||||
if( request.pfunction->code == FUN_CAT )
|
||||
{
|
||||
|
Reference in New Issue
Block a user