2008-12-30 02:05:03 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2009-04-21 22:50:55 +02:00
|
|
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
2008-12-30 02:05:03 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "content.h"
|
2009-04-21 22:50:55 +02:00
|
|
|
#include "../core/request.h"
|
|
|
|
#include "../core/error.h"
|
2010-02-19 00:30:22 +01:00
|
|
|
#include "../core/data.h"
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Content::FunCat()
|
|
|
|
{
|
|
|
|
if( !request.is_item )
|
|
|
|
{
|
2010-02-19 00:30:22 +01:00
|
|
|
log << log1 << "Content: cat function requires an item" << logend;
|
2010-01-11 15:47:52 +01:00
|
|
|
request.status = Error::no_item;
|
2008-12-30 02:05:03 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( !request.HasReadAccess(request.item) )
|
|
|
|
{
|
2010-01-11 15:47:52 +01:00
|
|
|
request.status = Error::permission_denied;
|
2008-12-30 02:05:03 +01:00
|
|
|
return;
|
|
|
|
}
|
2010-02-19 00:30:22 +01:00
|
|
|
|
|
|
|
request.send_as_attachment = request.IsParam("attachment");
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|