removed config options: ezc_error_prefix and ezc_error_postfix
Ezc::PatternParser and Ezc::Generator use only pt::Log as a logger now
This commit is contained in:
@@ -98,7 +98,6 @@ void InitGenerator(EzcGen & gen, Ezc::Models & ezc_models)
|
||||
gen.SkipNewLine(gen_skip_new_line);
|
||||
gen.RecognizeSpecialChars(gen_use_special_chars);
|
||||
gen.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
|
||||
gen.SetCommentary(config->ezc_error_prefix, config->ezc_error_postfix);
|
||||
|
||||
/*
|
||||
* although we have addresses to blocks and functions cached in patters
|
||||
@@ -110,6 +109,7 @@ void InitGenerator(EzcGen & gen, Ezc::Models & ezc_models)
|
||||
gen.SetVariables(ezc_vars);
|
||||
|
||||
gen.SetModels(ezc_models);
|
||||
gen.SetLogger(log);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,11 +67,6 @@ void PatternCacher::SetEzcObjects(Ezc::Objects<HtmlTextStream> * obj)
|
||||
}
|
||||
|
||||
|
||||
void PatternCacher::SetEzcCommentary(const std::wstring & start, const std::wstring & end)
|
||||
{
|
||||
pattern_parser.SetCommentary(start, end);
|
||||
}
|
||||
|
||||
void PatternCacher::SetWhenDelete(size_t when_delete, size_t how_many_del)
|
||||
{
|
||||
when_delete_patterns = when_delete;
|
||||
@@ -121,7 +116,6 @@ void PatternCacher::CreatePattern(const Item & item, Ezc::Pattern & pattern)
|
||||
* blocks cannot be created in patterns generated from virtual FS
|
||||
* but we can call other blocks (from normal templates)
|
||||
*
|
||||
* pattern_parser.SetCommentary() is set beforehand
|
||||
*/
|
||||
pattern_parser.AllowInclude(false);
|
||||
pattern_parser.DeleteWhiteTextItems(false);
|
||||
|
||||
@@ -73,10 +73,6 @@ public:
|
||||
// this blocks (pointers to them) will be cached in patterns
|
||||
void SetEzcBlocks(Ezc::Blocks * blocks);
|
||||
|
||||
// commentary prefix/postfix used in pattern_parser
|
||||
// (when there is an error)
|
||||
void SetEzcCommentary(const std::wstring & start, const std::wstring & end);
|
||||
|
||||
// returning a pattern corresponding to the 'item'
|
||||
Ezc::Pattern * GetPattern(const Item & item);
|
||||
|
||||
|
||||
@@ -98,12 +98,6 @@ void Patterns::SetEzcObjects(Ezc::Objects<HtmlTextStream> * obj)
|
||||
}
|
||||
|
||||
|
||||
void Patterns::SetEzcCommentary(const std::wstring & start, const std::wstring & end)
|
||||
{
|
||||
pattern_parser.SetCommentary(start, end);
|
||||
}
|
||||
|
||||
|
||||
size_t Patterns::Add(const wchar_t * file_name, bool read_pattern)
|
||||
{
|
||||
for(size_t i=0 ; i<pat_tab.size() ; ++i)
|
||||
|
||||
@@ -87,12 +87,6 @@ public:
|
||||
void SetEzcObjects(Ezc::Objects<HtmlTextStream> * obj);
|
||||
|
||||
|
||||
/*
|
||||
commentary prefix/postfix used in pattern_parser
|
||||
(when there is an error)
|
||||
*/
|
||||
void SetEzcCommentary(const std::wstring & start, const std::wstring & end);
|
||||
|
||||
/*
|
||||
adding a new pattern and returning its index
|
||||
if the pattern already exists the method returns its index only
|
||||
|
||||
@@ -1009,10 +1009,7 @@ void Templates::Init()
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
patterns.SetDirectories(config->templates_dir, config->templates_dir_default);
|
||||
patterns.SetEzcCommentary(config->ezc_error_prefix, config->ezc_error_postfix);
|
||||
|
||||
pattern_cacher.SetWhenDelete(config->pattern_cacher_when_delete, config->pattern_cacher_how_many_delete);
|
||||
pattern_cacher.SetEzcCommentary(config->ezc_error_prefix, config->ezc_error_postfix);
|
||||
CreateFunctions(); // create functions first (functions will be cached by patterns)
|
||||
ReadTemplates();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user