45 lines
708 B
C++
Executable File
45 lines
708 B
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "content.h"
|
|
#include "../app/content.h"
|
|
#include "../core/functioncodeparser.h"
|
|
|
|
|
|
|
|
|
|
void Content::FunRun()
|
|
{
|
|
if( !request.is_item )
|
|
{
|
|
log << log1 << "Content: Run function requires an item" << logend;
|
|
request.status = Error::item_required;
|
|
return;
|
|
}
|
|
|
|
if( !request.HasReadExecAccess(request.item) )
|
|
{
|
|
request.status = Error::permision_denied;
|
|
return;
|
|
}
|
|
|
|
FunctionCodeParser fc;
|
|
|
|
int c = fc.Parse(request.item);
|
|
|
|
#ifdef APPFUNCTIONS
|
|
if( c != FUN_NONE )
|
|
AppContent::AppFunction(c);
|
|
#endif
|
|
}
|
|
|
|
|
|
|
|
|