added: parameters consist of a name and a value now
sample: /dir/dir2/function/paramname:paramvalue removed: TemplatesMisc namespace git-svn-id: svn://ttmath.org/publicrep/winix/trunk@618 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -85,8 +85,14 @@ misc.o: ../core/users.h ../core/user.h ../core/ugcontainer.h ../core/log.h
|
||||
misc.o: ../core/groups.h ../core/group.h ../core/functions.h
|
||||
misc.o: ../core/function.h ../core/lastcontainer.h ../core/mounts.h
|
||||
misc.o: ../core/mount.h ../core/error.h ../core/rebus.h ../core/loadavg.h
|
||||
misc.o: ../core/misc.h misc.h localefilter.h ../core/locale.h
|
||||
misc.o: ../confparser/confparser.h
|
||||
misc.o: ../core/misc.h ../core/request.h ../core/requesttypes.h
|
||||
misc.o: ../core/session.h ../core/plugindata.h ../core/thread.h
|
||||
misc.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||
misc.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
|
||||
misc.o: ../core/postmultiparser.h ../core/ticket.h templates.h
|
||||
misc.o: patterncacher.h ../core/item.h misc.h localefilter.h ../core/locale.h
|
||||
misc.o: ../confparser/confparser.h ckeditorgetparser.h
|
||||
misc.o: ../core/httpsimpleparser.h ../core/log.h indexpatterns.h
|
||||
mount.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
|
||||
mount.o: ../core/locale.h ../confparser/confparser.h ckeditorgetparser.h
|
||||
mount.o: ../core/httpsimpleparser.h ../core/log.h indexpatterns.h
|
||||
|
||||
@@ -263,14 +263,14 @@ void item_date_modification(Info & i)
|
||||
void item_date_creation_nice(Info & i)
|
||||
{
|
||||
tm * ptm = &request.item.date_creation;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
print_date_nice(i, ptm);
|
||||
}
|
||||
|
||||
|
||||
void item_date_modification_nice(Info & i)
|
||||
{
|
||||
tm * ptm = &request.item.date_modification;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
print_date_nice(i, ptm);
|
||||
}
|
||||
|
||||
|
||||
@@ -535,7 +535,7 @@ void item_tab_date_creation_nice(Info & i)
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_creation;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
print_date_nice(i, ptm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ void item_tab_date_modification_nice(Info & i)
|
||||
if( item_index < request.item_table.size() )
|
||||
{
|
||||
tm * ptm = &request.item_table[item_index].date_modification;
|
||||
TemplatesMisc::print_date_nice(i, ptm);
|
||||
print_date_nice(i, ptm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,15 @@ void ls_ckeditor_funnum_browse(Info & i)
|
||||
ls_ckeditor_reqid = request.id;
|
||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
||||
|
||||
if( !request.param_table.empty() )
|
||||
if( !request.get_table.empty() )
|
||||
{
|
||||
const char * str = request.param_table[request.param_table.size()-1]->c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
size_t last = request.get_table.size()-1;
|
||||
|
||||
if( !request.get_table[last].empty() )
|
||||
{
|
||||
const char * str = request.get_table[last].c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
}
|
||||
}
|
||||
|
||||
ls_ckeditor_funnum = ckeditor_getparser.fun_num;
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
#include "../core/data.h"
|
||||
#include "../core/misc.h"
|
||||
#include "../core/request.h"
|
||||
#include "templates.h"
|
||||
#include "misc.h"
|
||||
|
||||
|
||||
namespace TemplatesMisc
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
|
||||
@@ -77,6 +79,28 @@ size_t loc, pat;
|
||||
}
|
||||
|
||||
|
||||
} // namespace TemplatesMisc
|
||||
|
||||
int ParseCKeditorFun()
|
||||
{
|
||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
||||
|
||||
if( !request.get_table.empty() )
|
||||
{
|
||||
size_t last = request.get_table.size()-1;
|
||||
|
||||
if( !request.get_table[last].empty() )
|
||||
{
|
||||
const char * str = request.get_table[last].c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
}
|
||||
}
|
||||
|
||||
return ckeditor_getparser.fun_num;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
|
||||
namespace TemplatesMisc
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
// table: [language][file]
|
||||
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
|
||||
@@ -36,7 +36,7 @@ void ClearPatterns(Patterns & patterns, size_t len);
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesMisc
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
IndexPatterns index_patterns;
|
||||
TemplatesMisc::Patterns patterns;
|
||||
Ezc::Functions functions;
|
||||
PatternCacher pattern_cacher;
|
||||
Locale locale;
|
||||
LocaleFilter locale_filter;
|
||||
CKEditorGetParser ckeditor_getparser;
|
||||
IndexPatterns index_patterns;
|
||||
Patterns patterns;
|
||||
Ezc::Functions functions;
|
||||
PatternCacher pattern_cacher;
|
||||
Locale locale;
|
||||
LocaleFilter locale_filter;
|
||||
CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
|
||||
const std::string empty; // used by GenerateRunRaw()
|
||||
@@ -485,7 +485,7 @@ void Templates::ReadFile(TemplatesFunctions::Pat pat, const char * file)
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
TemplatesMisc::Read(patterns, static_cast<size_t>(pat), locale, locale_filter, file);
|
||||
Read(patterns, static_cast<size_t>(pat), locale, locale_filter, file);
|
||||
}
|
||||
|
||||
|
||||
@@ -587,8 +587,8 @@ using namespace TemplatesFunctions;
|
||||
void Templates::ClearPatterns()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
TemplatesMisc::ClearPatterns(patterns, pat_last);
|
||||
|
||||
TemplatesFunctions::ClearPatterns(patterns, pat_last);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -69,11 +69,11 @@ namespace TemplatesFunctions
|
||||
};
|
||||
|
||||
|
||||
extern IndexPatterns index_patterns;
|
||||
extern TemplatesMisc::Patterns patterns;
|
||||
extern PatternCacher pattern_cacher;
|
||||
extern Locale locale;
|
||||
extern Ezc::Functions functions;
|
||||
extern IndexPatterns index_patterns;
|
||||
extern Patterns patterns;
|
||||
extern PatternCacher pattern_cacher;
|
||||
extern Locale locale;
|
||||
extern Ezc::Functions functions;
|
||||
extern CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ void thread_tab_last_item_date_modification_nice(Info & i)
|
||||
{
|
||||
if( thread_tab_index < request.thread_tab.size() )
|
||||
if( request.thread_tab[thread_tab_index].last_item.id != -1 )
|
||||
TemplatesMisc::print_date_nice(i, &request.thread_tab[thread_tab_index].last_item.date_modification);
|
||||
print_date_nice(i, &request.thread_tab[thread_tab_index].last_item.date_modification);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,10 +27,15 @@ void upload_ckeditor_funnum(Info & i)
|
||||
upload_ckeditor_reqid = request.id;
|
||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
||||
|
||||
if( !request.param_table.empty() )
|
||||
if( !request.get_table.empty() )
|
||||
{
|
||||
const char * str = request.param_table[request.param_table.size()-1]->c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
size_t last = request.get_table.size()-1;
|
||||
|
||||
if( !request.get_table[last].empty() )
|
||||
{
|
||||
const char * str = request.get_table[last].c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
}
|
||||
}
|
||||
|
||||
upload_fun_num = ckeditor_getparser.fun_num;
|
||||
|
||||
Reference in New Issue
Block a user