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:
@@ -95,6 +95,12 @@ void done_defaulted_dir(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void done_reloaded_templates(Info & i)
|
||||
{
|
||||
i.result = request.session->done == Done::reloaded_templates;
|
||||
}
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
@@ -28,6 +28,7 @@ Ezc::Pattern pat_fun_who;
|
||||
Ezc::Pattern pat_fun_run;
|
||||
Ezc::Pattern pat_fun_last;
|
||||
Ezc::Pattern pat_fun_thread;
|
||||
Ezc::Pattern pat_fun_reload;
|
||||
Ezc::Pattern pat_fun_createthread;
|
||||
Ezc::Pattern pat_err_item_required;
|
||||
Ezc::Pattern pat_err_404;
|
||||
@@ -110,6 +111,10 @@ Ezc::Pattern * p = 0;
|
||||
p = &pat_fun_thread;
|
||||
break;
|
||||
|
||||
case FUN_RELOAD:
|
||||
p = &pat_fun_reload;
|
||||
break;
|
||||
|
||||
case FUN_CREATETHREAD:
|
||||
p = &pat_fun_createthread;
|
||||
break;
|
||||
@@ -322,6 +327,7 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("done_added_dir", done_added_dir);
|
||||
functions.Insert("done_deleted_dir", done_deleted_dir);
|
||||
functions.Insert("done_defaulted_dir", done_defaulted_dir);
|
||||
functions.Insert("done_reloaded_templates", done_reloaded_templates);
|
||||
|
||||
|
||||
/*
|
||||
@@ -384,7 +390,7 @@ void Templates::CreateFunctions()
|
||||
|
||||
|
||||
|
||||
void Templates::Read()
|
||||
void Templates::ReadTemplates()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
@@ -448,8 +454,9 @@ void Templates::Read()
|
||||
pat_dir_last_info.Directory(data.templates);
|
||||
pat_dir_last_info.ParseFile("dir_last_info.html");
|
||||
|
||||
pat_fun_reload.Directory(data.templates);
|
||||
pat_fun_reload.ParseFile("fun_reload.html");
|
||||
|
||||
CreateFunctions();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -174,7 +174,7 @@ namespace TemplatesFunctions
|
||||
void done_defaulted_dir(Info & i);
|
||||
|
||||
void done_loggedout(Info & i);
|
||||
|
||||
void done_reloaded_templates(Info & i);
|
||||
|
||||
/*
|
||||
who
|
||||
@@ -229,18 +229,11 @@ namespace TemplatesFunctions
|
||||
|
||||
class Templates
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
void Read();
|
||||
void Generate();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void ReadTemplates();
|
||||
void CreateFunctions();
|
||||
void Generate();
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user