changed: the way of building the cmslu
main Makefile is in an application directory in cmslu/ there are only libraries: core.a content.a confparser.a templates.a added: macros APPTEMPLATES APPFUNCTIONS defined in the application's Makefile added: PatternCacher added: cmslu function 'run' files which have exec permissions can be run (run is a default function) after read from the database the content is parsed into Ezc::Pattern object, this object is then cached in PatternCacher added: FunctionCodeParser - will be used to parse the code from standard functions (ls/cat/...) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@475 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -44,8 +44,11 @@ void Content::SetDefaultFunction()
|
||||
{
|
||||
if( request.is_item )
|
||||
{
|
||||
request.pfunction = data.functions.GetFunction(Function::cat);
|
||||
|
||||
if( request.HasReadExecAccess(request.item) )
|
||||
request.pfunction = data.functions.GetFunction(FUN_RUN);
|
||||
else
|
||||
request.pfunction = data.functions.GetFunction(FUN_CAT);
|
||||
|
||||
if( request.pfunction )
|
||||
log << log3 << "Content: default function: " << request.pfunction->item.url << logend;
|
||||
}
|
||||
@@ -55,7 +58,7 @@ void Content::SetDefaultFunction()
|
||||
|
||||
if( default_item == -1 )
|
||||
{
|
||||
request.pfunction = data.functions.GetFunction(Function::ls);
|
||||
request.pfunction = data.functions.GetFunction(FUN_LS);
|
||||
|
||||
if( request.pfunction )
|
||||
log << log3 << "Content: default function: " << request.pfunction->item.url << logend;
|
||||
@@ -87,31 +90,34 @@ void Content::MakeStandardFunction()
|
||||
}
|
||||
|
||||
|
||||
if( request.pfunction->code == Function::logout )
|
||||
if( request.pfunction->code == FUN_LOGOUT )
|
||||
FunLogout();
|
||||
else
|
||||
if( request.pfunction->code == Function::cat )
|
||||
if( request.pfunction->code == FUN_CAT )
|
||||
FunCat();
|
||||
else
|
||||
if( request.pfunction->code == Function::ls )
|
||||
if( request.pfunction->code == FUN_LS )
|
||||
FunLs();
|
||||
else
|
||||
if( request.pfunction->code == Function::emacs )
|
||||
if( request.pfunction->code == FUN_EMACS )
|
||||
FunEmacs();
|
||||
else
|
||||
if( request.pfunction->code == Function::mkdir )
|
||||
if( request.pfunction->code == FUN_MKDIR )
|
||||
FunMkdir();
|
||||
else
|
||||
if( request.pfunction->code == Function::default_item )
|
||||
FunDefaultItem();
|
||||
if( request.pfunction->code == FUN_DEFAULT )
|
||||
FunDefault();
|
||||
else
|
||||
if( request.pfunction->code == Function::privileges )
|
||||
FunPrivileges();
|
||||
if( request.pfunction->code == FUN_PRIV )
|
||||
FunPriv();
|
||||
else
|
||||
if( request.pfunction->code == Function::rm )
|
||||
if( request.pfunction->code == FUN_RM )
|
||||
FunRm();
|
||||
else
|
||||
if( request.pfunction->code == Function::node )
|
||||
if( request.pfunction->code == FUN_RUN )
|
||||
FunRun();
|
||||
else
|
||||
if( request.pfunction->code == FUN_NODE )
|
||||
FunNode();
|
||||
|
||||
}
|
||||
@@ -131,23 +137,23 @@ void Content::MakePost()
|
||||
|
||||
switch( request.pfunction->code )
|
||||
{
|
||||
case Function::emacs:
|
||||
case FUN_EMACS:
|
||||
PostFunEmacs();
|
||||
break;
|
||||
|
||||
case Function::mkdir:
|
||||
case FUN_MKDIR:
|
||||
PostFunMkdir();
|
||||
break;
|
||||
|
||||
case Function::default_item:
|
||||
PostFunDefaultItem();
|
||||
case FUN_DEFAULT:
|
||||
PostFunDefault();
|
||||
break;
|
||||
|
||||
case Function::privileges:
|
||||
PostFunPrivileges();
|
||||
case FUN_PRIV:
|
||||
PostFunPriv();
|
||||
break;
|
||||
|
||||
case Function::login:
|
||||
case FUN_LOGIN:
|
||||
PostFunLogin();
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user