updated: to the new Ezc API

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@974 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2014-10-18 18:12:04 +00:00
parent 8196fb77d1
commit 5266a7e4e5
26 changed files with 864 additions and 676 deletions

View File

@@ -161,7 +161,14 @@ Ezc::Pattern * p = 0;
content_gen.SkipNewLine(gen_skip_new_line);
content_gen.RecognizeSpecialChars(gen_use_special_chars);
content_gen.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
content_gen.Generate(i.out, *p);
/*
* !! IMPROVE ME
* add blocks and variables
*/
//content_gen.AddFunctions();
content_gen.SetPattern(*p);
content_gen.Generate(i.out);
}
else
{
@@ -656,7 +663,6 @@ void Templates::CreateFunctions()
ezc_functions.Insert("winix_subdomain_is_not_empty", winix_subdomain_is_not_empty);
ezc_functions.Insert("winix_subdomain_is", winix_subdomain_is);
ezc_functions.Insert("str", str);
ezc_functions.Insert("strnc", strnc);
ezc_functions.Insert("winix_tz_tab", winix_tz_tab);
ezc_functions.Insert("winix_tz_tab_id", winix_tz_tab_id);
ezc_functions.Insert("winix_tz_tab_name", winix_tz_tab_name);
@@ -972,7 +978,12 @@ using namespace TemplatesFunctions;
generator.SkipNewLine(gen_skip_new_line);
generator.RecognizeSpecialChars(gen_use_special_chars);
generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
generator.Generate(cur->request->out_streams, *index);
generator.SetPattern(*index);
/*
* !! IMPROVE ME
* add blocks and variables
*/
generator.Generate(cur->request->out_streams);
}
else
{
@@ -989,12 +1000,14 @@ using namespace TemplatesFunctions;
if( !empty_pars.empty() )
empty_pars.clear();
Ezc::Stack s;
// !! FIX ME
// at the moment stream 0 is used
// here should be something other
Info info(cur->request->out_streams[0], empty_pars, empty_string, empty_stream);
Info info(cur->request->out_streams[0], empty_pars, empty_string, empty_stream, s);
info.iter = 0;
info.iter = s.iter;
info.res = false;
item_run(info);
@@ -1009,7 +1022,12 @@ using namespace TemplatesFunctions;
generator.SkipNewLine(gen_skip_new_line);
generator.RecognizeSpecialChars(gen_use_special_chars);
generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
generator.Generate(cur->request->out_streams, pattern);
generator.SetPattern(pattern);
/*
* !! IMPROVE ME
* add blocks and variables
*/
generator.Generate(cur->request->out_streams);
}