changed: updated to the new ezc api, this with O(1) when looking for a specific ezc function
changed: sessions are deleted at the end of a request (and only a few sessions)
other sessions will be deleted after a next request
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@684 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -19,12 +19,12 @@
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
IndexPatterns index_patterns;
|
||||
Patterns patterns;
|
||||
Patterns patterns_fun;
|
||||
EzcFun ezc_functions;
|
||||
PatternCacher pattern_cacher;
|
||||
IndexPatterns index_patterns; // patterns for main index template (those from mountpoint)
|
||||
Patterns patterns; // those patterns from enum Pat
|
||||
Patterns patterns_fun; // patterns for winix functions
|
||||
PatternCacher pattern_cacher; // patterns for user items (files with an executable bit set)
|
||||
Locale locale;
|
||||
EzcFun ezc_functions;
|
||||
LocaleFilter locale_filter;
|
||||
CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
@@ -111,8 +111,9 @@ Ezc::Pattern * p = 0;
|
||||
|
||||
if( p )
|
||||
{
|
||||
EzcGen gen(i.out, *p, ezc_functions);
|
||||
gen.Generate();
|
||||
EzcGen gen;
|
||||
//gen.Generate(i.out, *p, ezc_functions);
|
||||
gen.Generate(i.out, *p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -436,7 +437,8 @@ void Templates::ReadFile(TemplatesFunctions::Pat pat, const wchar_t * file)
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
Read(patterns, static_cast<size_t>(pat), locale, locale_filter, file);
|
||||
Read(patterns, static_cast<size_t>(pat), locale, locale_filter, ezc_functions, file, config->utf8,
|
||||
config->templates_dir, config->templates_dir_default);
|
||||
}
|
||||
|
||||
|
||||
@@ -444,7 +446,8 @@ void Templates::ReadFileFun(size_t index, const wchar_t * file)
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
Read(patterns_fun, index, locale, locale_filter, file);
|
||||
Read(patterns_fun, index, locale, locale_filter, ezc_functions, file, config->utf8,
|
||||
config->templates_dir, config->templates_dir_default);
|
||||
}
|
||||
|
||||
|
||||
@@ -557,7 +560,7 @@ using namespace TemplatesFunctions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// index_patterns and patterns for items are not cleared here
|
||||
void Templates::ClearPatterns()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
@@ -607,8 +610,9 @@ using namespace TemplatesFunctions;
|
||||
if( !index )
|
||||
index = &patterns[locale.GetLang()][pat_index];
|
||||
|
||||
EzcGen generator(request->page, *index, ezc_functions);
|
||||
generator.Generate();
|
||||
EzcGen generator;
|
||||
//generator.Generate(request->page, *index, ezc_functions);
|
||||
generator.Generate(request->page, *index);
|
||||
}
|
||||
|
||||
|
||||
@@ -668,6 +672,9 @@ void Templates::SetSessionManager(SessionManager * psession_manager)
|
||||
|
||||
Templates::Templates()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
index_patterns.SetEzcFunctions(&ezc_functions);
|
||||
pattern_cacher.SetEzcFunctions(&ezc_functions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user