small refactoring
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@619 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
50cb88c5ed
commit
262ba10443
|
@ -145,7 +145,12 @@ size_t i;
|
||||||
|
|
||||||
request.param_table.push_back(param);
|
request.param_table.push_back(param);
|
||||||
|
|
||||||
log << log3 << "FP: Param: name=" << param.name << ", value=" << param.value << logend;
|
log << log3 << "FP: Param: name=" << param.name;
|
||||||
|
|
||||||
|
if( !param.value.empty() )
|
||||||
|
log << ", value=" << param.value;
|
||||||
|
|
||||||
|
log << logend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "../core/request.h"
|
#include "../core/request.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,21 +26,8 @@ void ls_ckeditor_funnum_browse(Info & i)
|
||||||
{
|
{
|
||||||
if( ls_ckeditor_reqid != request.id )
|
if( ls_ckeditor_reqid != request.id )
|
||||||
{
|
{
|
||||||
ls_ckeditor_reqid = request.id;
|
ls_ckeditor_reqid = request.id;
|
||||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
ls_ckeditor_funnum = ParseCKeditorFun();
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ls_ckeditor_funnum = ckeditor_getparser.fun_num;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i.out << ls_ckeditor_funnum;
|
i.out << ls_ckeditor_funnum;
|
||||||
|
|
|
@ -36,13 +36,30 @@ void print_date_nice(Ezc::Info & i, const tm * ptm)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// those functions from here are used in the second thread too
|
// those functions from here are used in the second thread too
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Read(Patterns & patterns, size_t pat, Locale & locale, LocaleFilter & locale_filter, const char * file, bool delete_white)
|
void Read(Patterns & patterns, size_t pat, Locale & locale, LocaleFilter & locale_filter, const char * file, bool delete_white)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -79,28 +96,6 @@ size_t loc, pat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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
|
} // namespace TemplatesFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,8 @@ namespace TemplatesFunctions
|
||||||
// table: [language][file]
|
// table: [language][file]
|
||||||
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
|
typedef std::vector<std::vector<Ezc::Pattern> > Patterns;
|
||||||
|
|
||||||
|
|
||||||
void print_date_nice(Ezc::Info & i, const tm * ptm);
|
void print_date_nice(Ezc::Info & i, const tm * ptm);
|
||||||
|
int ParseCKeditorFun();
|
||||||
|
|
||||||
|
|
||||||
// those functions from here are used in the second thread too
|
// those functions from here are used in the second thread too
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
#include "../core/request.h"
|
#include "../core/request.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
namespace TemplatesFunctions
|
namespace TemplatesFunctions
|
||||||
|
@ -25,20 +26,7 @@ void upload_ckeditor_funnum(Info & i)
|
||||||
if( upload_ckeditor_reqid != request.id )
|
if( upload_ckeditor_reqid != request.id )
|
||||||
{
|
{
|
||||||
upload_ckeditor_reqid = request.id;
|
upload_ckeditor_reqid = request.id;
|
||||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
upload_fun_num = ParseCKeditorFun();
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
upload_fun_num = ckeditor_getparser.fun_num;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i.out << upload_fun_num;
|
i.out << upload_fun_num;
|
||||||
|
|
Loading…
Reference in New Issue