small refactoring

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@619 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-07-05 15:21:06 +00:00
parent 50cb88c5ed
commit 262ba10443
5 changed files with 31 additions and 56 deletions

View File

@@ -9,6 +9,7 @@
#include "templates.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 )
{
ls_ckeditor_reqid = request.id;
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);
}
}
ls_ckeditor_funnum = ckeditor_getparser.fun_num;
ls_ckeditor_reqid = request.id;
ls_ckeditor_funnum = ParseCKeditorFun();
}
i.out << ls_ckeditor_funnum;