/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2008-2010, Tomasz Sowa * All rights reserved. * */ #include #include "templates.h" #include "../core/request.h" namespace TemplatesFunctions { static size_t upload_ckeditor_reqid = 0; static int upload_fun_num = 0; void upload_ckeditor_funnum(Info & i) { if( upload_ckeditor_reqid != request.id ) { upload_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); } } upload_fun_num = ckeditor_getparser.fun_num; } i.out << upload_fun_num; } } // namespace