renamed: WinixModel -> WinixModelDeprecated (this class will be removed)
added: WinixModel (models/winixmodel.h|cpp) - a class inheriting from morm::WinixModel, we have methods such as: get_config(), get_logger(), get_request()
and this class will be a base class for our models
added: WinixModelConnector (models/winixmodelconnector.h|cpp) - a class inheriting from morm::WinixModelConnector
this connector we are using instead of morm::ModelConnector - there are pointers to winix objects there (config, request, log)
added to Request: Ezc::Models models
removed from TemplatesFunctions: Ezc::Models ezc_models;
changed: ImgCrop winix functions is using its own item_tab vector now (not finished yet)
added: Item::is(), Item::link(), ItemContent::print_content()
This commit is contained in:
@@ -63,7 +63,6 @@ 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;
|
||||
|
||||
@@ -186,7 +185,7 @@ Ezc::Pattern * p = 0;
|
||||
|
||||
if( p )
|
||||
{
|
||||
InitGenerator(content_gen);
|
||||
InitGenerator(content_gen, cur->request->models);
|
||||
content_gen.SetPattern(*p);
|
||||
content_gen.Generate(i.out, cur->request->out_streams);
|
||||
}
|
||||
@@ -438,7 +437,6 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("item_content", item_content);
|
||||
ezc_functions.Insert("item_content_noescape", item_content_noescape);
|
||||
ezc_functions.Insert("item_content_type_is", item_content_type_is);
|
||||
ezc_functions.Insert("item_print_content", item_print_content);
|
||||
ezc_functions.Insert("item_privileges", item_privileges);
|
||||
ezc_functions.Insert("item_dir", item_dir);
|
||||
ezc_functions.Insert("item_url", item_url);
|
||||
@@ -486,6 +484,7 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("item_admin_meta_tab_has_next", item_admin_meta_tab_has_next);
|
||||
ezc_functions.Insert("item_can_content_be_html_filtered", item_can_content_be_html_filtered);
|
||||
|
||||
/*
|
||||
ezc_functions.Insert("item_tab", item_tab);
|
||||
ezc_functions.Insert("item_tab_index", item_tab_index);
|
||||
ezc_functions.Insert("item_tab_id", item_tab_id);
|
||||
@@ -530,7 +529,7 @@ void Templates::CreateFunctions()
|
||||
ezc_functions.Insert("item_tab_meta_tab", item_tab_meta_tab);
|
||||
ezc_functions.Insert("item_tab_meta_tab_value", item_tab_meta_tab_value);
|
||||
ezc_functions.Insert("item_tab_meta_tab_has_next", item_tab_meta_tab_has_next);
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
last
|
||||
@@ -1024,8 +1023,6 @@ using namespace TemplatesFunctions;
|
||||
|
||||
log << log4 << "Templates: patterns cache size: " << pattern_cacher.Size() << logend;
|
||||
pattern_cacher.DeleteOldPatterns();
|
||||
|
||||
ezc_models.Clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -1128,7 +1125,7 @@ using namespace TemplatesFunctions;
|
||||
|
||||
if( index )
|
||||
{
|
||||
InitGenerator(generator);
|
||||
InitGenerator(generator, cur->request->models);
|
||||
generator.SetPattern(*index);
|
||||
generator.Generate(cur->request->out_main_stream, cur->request->out_streams);
|
||||
}
|
||||
@@ -1147,7 +1144,7 @@ void Templates::Generate(Ezc::Pattern & pattern)
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
ezc_vars.clear();
|
||||
InitGenerator(generator);
|
||||
InitGenerator(generator, cur->request->models);
|
||||
generator.SetPattern(pattern);
|
||||
generator.Generate(cur->request->out_main_stream, cur->request->out_streams);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user