start adding support for Models objects from Ezc

This commit is contained in:
2021-05-31 18:59:20 +02:00
parent 22de3322ae
commit 6e4f8f5191
9 changed files with 62 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ namespace TemplatesFunctions
extern EzcFun ezc_functions;
extern Ezc::Blocks ezc_blocks;
extern Ezc::Vars ezc_vars;
extern Ezc::Models ezc_models;
void HtmlEscapeFormTxt(HtmlTextStream & out, const std::wstring & in)
@@ -108,6 +109,8 @@ void InitGenerator(EzcGen & gen)
gen.SetBlocks(ezc_blocks);
gen.SetFunctions(ezc_functions);
gen.SetVariables(ezc_vars);
gen.SetModels(ezc_models);
}

View File

@@ -63,6 +63,7 @@ EzcFun ezc_functions;
Ezc::Blocks ezc_blocks;
Ezc::Objects<HtmlTextStream> ezc_objects;
Ezc::Vars ezc_vars;
Ezc::Models ezc_models;
LocaleFilter locale_filter;
HTMLFilter html_filter;
@@ -1022,7 +1023,9 @@ void Templates::ClearAfterRequest()
using namespace TemplatesFunctions;
log << log4 << "Templates: patterns cache size: " << pattern_cacher.Size() << logend;
pattern_cacher.DeleteOldPatterns();
pattern_cacher.DeleteOldPatterns();
ezc_models.Clear();
}

View File

@@ -96,6 +96,7 @@ namespace TemplatesFunctions
extern bool gen_skip_new_line;
extern bool gen_use_special_chars;
extern Ezc::Models ezc_models;