fixed: index templates and 'change' templates were not cleared when 'reload' function was called

so wrong indexes have been assigned


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@759 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2011-08-27 03:12:33 +00:00
parent 4f114ea33c
commit b984475e49
7 changed files with 57 additions and 24 deletions

View File

@@ -171,7 +171,7 @@ void Templates::CreateFunctions()
ezc_functions.Insert("dir_can_remove", dir_can_remove);
ezc_functions.Insert("dir_can_use_emacs", dir_can_use_emacs);
ezc_functions.Insert("dir_can_use_mkdir", dir_can_use_mkdir);
ezc_functions.Insert("dir_has_parents",dir_has_parents);
ezc_functions.Insert("dir_has_parents", dir_has_parents);
ezc_functions.Insert("dir_childs_tab", dir_childs_tab);
ezc_functions.Insert("dir_childs_is_parent", dir_childs_is_parent);
@@ -680,6 +680,8 @@ using namespace TemplatesFunctions;
ReadLocale();
patterns.Clear();
index_patterns.Clear();
change_patterns.Clear();
pat_index = patterns.Add(config->templates_index);
pat_err_404 = patterns.Add(L"err_404.html");
@@ -689,6 +691,8 @@ using namespace TemplatesFunctions;
ReadIndexTemplates();
ReadChangeTemplates();
plugin.Call(WINIX_ADD_TEMPLATE);
SetHtmlFilter();
log << log3 << "Templates: there are " << patterns.Size() << " patterns"