fixed: the core didn't test for special folder when system was running

(now mkdir addes correctly special folders)
added: function 'reload'
       param: 'templates' - reloading templates


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@519 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-11-16 17:43:23 +00:00
parent 9129f1b82a
commit c62d48160a
13 changed files with 123 additions and 29 deletions

45
content/reload.cpp Executable file
View File

@@ -0,0 +1,45 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008-2009, Tomasz Sowa
* All rights reserved.
*
*/
#include "content.h"
#include "../core/request.h"
#include "../core/error.h"
void Content::FunReloadTemplates()
{
log << log1 << "Content: reloading html templates" << logend;
templates.ReadTemplates();
request.session->done = Done::reloaded_templates;
request.session->done_status = Error::ok;
request.session->done_timer = 1;
}
void Content::FunReload()
{
// !! temporarily only an admin has access
if( !request.session->puser || !request.session->puser->super_user )
{
log << log1 << "Content: Only an admin has access to reload function" << logend;
request.status = Error::permision_denied;
return;
}
if( request.IsParam("templates") )
FunReloadTemplates();
}