added support for UTF-8

now the UTF-8 is a default charset


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-11-21 00:19:17 +00:00
parent f1f0fa34cb
commit 8e72a820dd
153 changed files with 4270 additions and 2784 deletions

View File

@@ -1,28 +1,31 @@
# DO NOT DELETE
bot.o: bot.h
init.o: ../../core/log.h ../../core/request.h ../../core/requesttypes.h
init.o: ../../core/session.h ../../core/item.h ../../core/error.h
init.o: ../../core/log.h ../../core/user.h ../../core/plugindata.h
init.o: ../../core/rebus.h ../../core/config.h ../../core/confparser.h
init.o: ../../core/htmlfilter.h ../../core/config.h ../../db/db.h
init.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h
init.o: ../../core/textstream.h ../../core/error.h ../../db/dbitemquery.h
init.o: ../../core/item.h ../../db/dbitemcolumns.h ../../core/user.h
init.o: ../../core/group.h ../../core/thread.h ../../core/dircontainer.h
init.o: ../../core/ugcontainer.h bot.h stats.h templates.h
init.o: ../../core/plugin.h ../../core/pluginmsg.h ../../core/request.h
init.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
init.o: ../../core/mounts.h ../../core/mount.h ../../core/mountparser.h
init.o: ../../core/users.h ../../core/ugcontainer.h
init.o: ../../core/log.h ../../core/textstream.h ../../core/misc.h
init.o: ../../core/item.h ../../core/request.h ../../core/requesttypes.h
init.o: ../../core/session.h ../../core/error.h ../../core/log.h
init.o: ../../core/user.h ../../core/plugindata.h ../../core/rebus.h
init.o: ../../core/config.h ../../core/confparser.h ../../core/htmlfilter.h
init.o: ../../core/config.h ../../db/db.h ../../db/dbbase.h ../../db/dbconn.h
init.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/error.h
init.o: ../../db/dbitemquery.h ../../core/item.h ../../db/dbitemcolumns.h
init.o: ../../core/user.h ../../core/group.h ../../core/thread.h
init.o: ../../core/dircontainer.h ../../core/ugcontainer.h bot.h stats.h
init.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h
init.o: ../../core/request.h ../../core/system.h ../../core/dirs.h
init.o: ../../core/dircontainer.h ../../core/mounts.h ../../core/mount.h
init.o: ../../core/mountparser.h ../../core/users.h ../../core/ugcontainer.h
init.o: ../../core/lastcontainer.h ../../core/groups.h ../../core/group.h
init.o: ../../core/loadavg.h ../../core/sessionmanager.h
init.o: ../../core/sessioncontainer.h ../../functions/functions.h
init.o: ../../functions/functionbase.h ../../core/system.h
init.o: ../../core/notify.h ../../templatesnotify/templatesnotify.h
init.o: ../../../ezc/src/ezc.h ../../core/mount.h ../../core/locale.h
init.o: ../../templates/misc.h ../../templates/localefilter.h
init.o: ../../core/locale.h ../../functions/functionparser.h
init.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
init.o: ../../../ezc/src/stringconv.h ../../../ezc/src/functions.h
init.o: ../../../ezc/src/funinfo.h ../../core/mount.h ../../templates/misc.h
init.o: ../../templates/localefilter.h ../../templates/locale.h
init.o: ../../core/confparser.h ../../functions/functionparser.h
init.o: ../../functions/adduser.h ../../functions/cat.h
init.o: ../../functions/chmod.h ../../functions/privchanger.h
init.o: ../../functions/chown.h ../../functions/ckeditor.h
@@ -38,12 +41,15 @@ init.o: ../../functions/template.h ../../functions/tinymce.h
init.o: ../../functions/uname.h ../../functions/upload.h
init.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
init.o: ../../core/htmlfilter.h ../../templates/templates.h
init.o: ../../templates/misc.h ../../templates/patterncacher.h
init.o: ../../core/item.h ../../templates/ckeditorgetparser.h
init.o: ../../core/httpsimpleparser.h ../../core/log.h
init.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
init.o: statssession.h ../../core/plugindata.h
stats.o: stats.h ../../core/config.h ../../core/log.h
init.o: ../../templates/patterncacher.h ../../core/item.h
init.o: ../../templates/ckeditorgetparser.h ../../core/httpsimpleparser.h
init.o: ../../core/log.h ../../templates/indexpatterns.h
init.o: ../../core/sessionmanager.h statssession.h ../../core/plugindata.h
stats.o: stats.h ../../core/config.h ../../core/log.h ../../core/textstream.h
stats.o: ../../core/misc.h ../../core/item.h ../../../ezc/src/ezc.h
stats.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
stats.o: ../../../ezc/src/pattern.h ../../../ezc/src/stringconv.h
stats.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
templates.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h
templates.o: ../../core/log.h ../../core/plugindata.h ../../core/config.h
templates.o: ../../core/confparser.h ../../core/htmlfilter.h
@@ -62,11 +68,15 @@ templates.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
templates.o: ../../core/session.h ../../functions/functions.h
templates.o: ../../functions/functionbase.h ../../core/request.h
templates.o: ../../core/requesttypes.h ../../core/config.h
templates.o: ../../core/system.h ../../core/notify.h
templates.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h
templates.o: ../../core/mount.h ../../core/locale.h ../../templates/misc.h
templates.o: ../../templates/localefilter.h ../../core/locale.h
templates.o: ../../core/requesttypes.h ../../core/textstream.h
templates.o: ../../core/misc.h ../../core/config.h ../../core/system.h
templates.o: ../../core/notify.h ../../templatesnotify/templatesnotify.h
templates.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
templates.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
templates.o: ../../../ezc/src/stringconv.h ../../../ezc/src/functions.h
templates.o: ../../../ezc/src/funinfo.h ../../core/mount.h
templates.o: ../../templates/misc.h ../../templates/localefilter.h
templates.o: ../../templates/locale.h ../../core/confparser.h
templates.o: ../../functions/functionparser.h ../../functions/adduser.h
templates.o: ../../functions/cat.h ../../functions/chmod.h
templates.o: ../../functions/privchanger.h ../../functions/chown.h
@@ -84,9 +94,8 @@ templates.o: ../../functions/template.h ../../functions/tinymce.h
templates.o: ../../functions/uname.h ../../functions/upload.h
templates.o: ../../functions/uptime.h ../../functions/who.h
templates.o: ../../functions/vim.h ../../core/htmlfilter.h
templates.o: ../../templates/templates.h ../../templates/misc.h
templates.o: ../../templates/patterncacher.h ../../core/item.h
templates.o: ../../templates/ckeditorgetparser.h
templates.o: ../../templates/templates.h ../../templates/patterncacher.h
templates.o: ../../core/item.h ../../templates/ckeditorgetparser.h
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
templates.o: ../../core/misc.h stats.h

View File

@@ -44,7 +44,10 @@ bool Bot::IsYahoo()
bool Bot::IsBing()
{
return BrowserNameHas("msnbot") && BrowserNameHas("+http://search.msn.com/msnbot.htm");
if( BrowserNameHas("msnbot") && BrowserNameHas("+http://search.msn.com/msnbot.htm") )
return true;
return BrowserNameHas("bingbot") && BrowserNameHas("+http://www.bing.com/bingbot.htm");
}

View File

@@ -20,7 +20,7 @@
extern "C" void Init(PluginInfo &);
const char plugin_name[] = "stats";
const wchar_t plugin_name[] = L"stats";
namespace Stats

View File

@@ -7,10 +7,10 @@
*
*/
#include <ctime>
#include "stats.h"
#include "core/log.h"
#include <ctime>
#include "ezc.h"
namespace Stats
@@ -67,18 +67,19 @@ void Stats::ReadStats()
if( stats_file.empty() )
return;
std::ifstream file(stats_file.c_str());
Ezc::WideToUTF8(stats_file, astats_file);
std::ifstream file(astats_file.c_str());
if( !file )
{
log << log1 << "Stats: I cannot open a file: " << stats_file << logend;
log << log1 << "Stats: I cannot open a file: " << astats_file << logend;
return;
}
ReadStats(file);
file.close();
log << log3 << "Stats: statistics loaded from: " << stats_file
log << log3 << "Stats: statistics loaded from: " << astats_file
<< " (" << stats_tab.size() << " items)" << logend;
}
@@ -117,18 +118,19 @@ void Stats::SaveStats()
if( stats_file.empty() )
return;
std::ofstream file(stats_file.c_str());
Ezc::WideToUTF8(stats_file, astats_file);
std::ofstream file(astats_file.c_str());
if( !file )
{
log << log1 << "Stats: I cannot open a file: " << stats_file << logend;
log << log1 << "Stats: I cannot open a file: " << astats_file << logend;
return;
}
SaveStats(file);
file.close();
log << log3 << "Stats: statistics saved to: " << stats_file << logend;
log << log3 << "Stats: statistics saved to: " << astats_file << logend;
}
@@ -147,8 +149,8 @@ void Stats::PeriodicSave()
void Stats::ReadConfig(Config * config)
{
stats_file = config->Text("stats_file");
req_save_freq = config->Int("stats_req_save_freq", req_save_freq);
stats_file = config->Text(L"stats_file");
req_save_freq = config->Int(L"stats_req_save_freq", req_save_freq);
if( stats_file.empty() )
{

View File

@@ -32,7 +32,8 @@ struct Stats
void RemoveItem(long id);
// file name for reading/saving statistics
std::string stats_file;
std::wstring stats_file;
std::string astats_file;
// when the statistics start
time_t stats_start;

View File

@@ -15,64 +15,66 @@
namespace Stats
{
using TemplatesFunctions::Info;
extern long current_item_id;
extern Stats stats;
void stats_from(Ezc::Info & i)
void stats_from(Info & i)
{
i.out << DateToStrWithoutHours(stats.stats_start);
}
void stats_all(Ezc::Info & i)
void stats_all(Info & i)
{
i.out << stats.global_all;
}
void stats_unique(Ezc::Info & i)
void stats_unique(Info & i)
{
i.out << stats.global_unique;
}
void stats_google(Ezc::Info & i)
void stats_google(Info & i)
{
i.out << stats.global_google;
}
void stats_yahoo(Ezc::Info & i)
void stats_yahoo(Info & i)
{
i.out << stats.global_yahoo;
}
void stats_bing(Ezc::Info & i)
void stats_bing(Info & i)
{
i.out << stats.global_bing;
}
void stats_item_all(Ezc::Info & i)
void stats_item_all(Info & i)
{
i.out << stats.stats_tab[current_item_id].all;
}
void stats_item_google(Ezc::Info & i)
void stats_item_google(Info & i)
{
i.out << stats.stats_tab[current_item_id].google;
}
void stats_item_yahoo(Ezc::Info & i)
void stats_item_yahoo(Info & i)
{
i.out << stats.stats_tab[current_item_id].yahoo;
}
void stats_item_bing(Ezc::Info & i)
void stats_item_bing(Info & i)
{
i.out << stats.stats_tab[current_item_id].bing;
}
@@ -82,7 +84,8 @@ void stats_item_bing(Ezc::Info & i)
void CreateFunctions(PluginInfo & info)
{
Ezc::Functions * fun = reinterpret_cast<Ezc::Functions*>(info.p1);
typedef Ezc::Functions<TextStream<std::wstring> > Fun;
Fun * fun = reinterpret_cast<Fun*>(info.p1);
fun->Insert("stats_from", stats_from);

View File

@@ -2,29 +2,32 @@
createticket.o: createticket.h tdb.h ticket.h ../../db/dbbase.h
createticket.o: ../../db/dbconn.h ../../db/dbtextstream.h
createticket.o: ../../core/textstream.h ../../core/error.h ../../core/log.h
createticket.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
createticket.o: ../../core/error.h ../../core/log.h ../../core/textstream.h
createticket.o: ../../functions/functionbase.h ../../core/item.h
createticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
createticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
createticket.o: ../../core/thread.h ../../core/dircontainer.h
createticket.o: ../../core/item.h ../../core/ugcontainer.h
createticket.o: ../../core/request.h ../../core/requesttypes.h
createticket.o: ../../core/session.h ../../core/error.h ../../core/user.h
createticket.o: ../../core/plugindata.h ../../core/rebus.h
createticket.o: ../../core/config.h ../../core/confparser.h
createticket.o: ../../core/htmlfilter.h ../../core/config.h
createticket.o: ../../core/system.h ../../core/dirs.h
createticket.o: ../../core/ugcontainer.h ../../core/request.h
createticket.o: ../../core/requesttypes.h ../../core/session.h
createticket.o: ../../core/error.h ../../core/user.h ../../core/plugindata.h
createticket.o: ../../core/rebus.h ../../core/config.h
createticket.o: ../../core/confparser.h ../../core/htmlfilter.h
createticket.o: ../../core/config.h ../../core/system.h ../../core/dirs.h
createticket.o: ../../core/dircontainer.h ../../core/request.h
createticket.o: ../../core/mounts.h ../../core/mount.h
createticket.o: ../../core/mountparser.h ../../core/users.h
createticket.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
createticket.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
createticket.o: ../../core/notify.h ../../templatesnotify/templatesnotify.h
createticket.o: ../../../ezc/src/ezc.h ../../core/mount.h ../../core/locale.h
createticket.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
createticket.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
createticket.o: ../../../ezc/src/stringconv.h ../../../ezc/src/functions.h
createticket.o: ../../../ezc/src/funinfo.h ../../core/mount.h
createticket.o: ../../templates/misc.h ../../templates/localefilter.h
createticket.o: ../../core/locale.h ../../core/system.h ticketinfo.h
createticket.o: ticketparser.h ticketconf.h ../../functions/functions.h
createticket.o: ../../functions/functionbase.h
createticket.o: ../../templates/locale.h ../../core/confparser.h
createticket.o: ../../core/system.h ticketinfo.h ticketparser.h ticketconf.h
createticket.o: ../../functions/functions.h ../../functions/functionbase.h
createticket.o: ../../functions/functionparser.h ../../functions/adduser.h
createticket.o: ../../functions/cat.h ../../functions/chmod.h
createticket.o: ../../functions/privchanger.h ../../functions/chown.h
@@ -44,9 +47,10 @@ createticket.o: ../../functions/uptime.h ../../functions/who.h
createticket.o: ../../functions/vim.h ../../core/htmlfilter.h
editticket.o: editticket.h tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
editticket.o: ../../db/dbtextstream.h ../../core/textstream.h
editticket.o: ../../core/error.h ../../core/log.h ticketinfo.h ticketparser.h
editticket.o: ticketconf.h ../../core/item.h ../../core/system.h
editticket.o: ../../core/dirs.h ../../core/item.h ../../core/dircontainer.h
editticket.o: ../../core/misc.h ../../core/item.h ../../core/error.h
editticket.o: ../../core/log.h ../../core/textstream.h ticketinfo.h
editticket.o: ticketparser.h ticketconf.h ../../core/item.h
editticket.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
editticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
editticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
editticket.o: ../../core/thread.h ../../core/dircontainer.h
@@ -61,32 +65,36 @@ editticket.o: ../../functions/functionbase.h ../../core/request.h
editticket.o: ../../core/requesttypes.h ../../core/session.h
editticket.o: ../../core/plugindata.h ../../core/config.h ../../core/notify.h
editticket.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h
editticket.o: ../../core/mount.h ../../core/locale.h ../../templates/misc.h
editticket.o: ../../templates/localefilter.h ../../core/locale.h
editticket.o: ../../core/system.h ../../functions/functions.h
editticket.o: ../../functions/functionbase.h ../../functions/functionparser.h
editticket.o: ../../functions/adduser.h ../../functions/cat.h
editticket.o: ../../functions/chmod.h ../../functions/privchanger.h
editticket.o: ../../functions/chown.h ../../functions/ckeditor.h
editticket.o: ../../functions/cp.h ../../functions/createthread.h
editticket.o: ../../functions/default.h ../../functions/download.h
editticket.o: ../../functions/emacs.h ../../functions/last.h
editticket.o: ../../functions/login.h ../../functions/logout.h
editticket.o: ../../functions/ls.h ../../functions/mkdir.h
editticket.o: ../../functions/mv.h ../../functions/node.h
editticket.o: ../../functions/priv.h ../../functions/reload.h
editticket.o: ../../functions/rm.h ../../functions/run.h
editticket.o: ../../functions/stat.h ../../functions/subject.h
editticket.o: ../../functions/funthread.h ../../functions/template.h
editticket.o: ../../functions/tinymce.h ../../functions/uname.h
editticket.o: ../../functions/upload.h ../../functions/uptime.h
editticket.o: ../../functions/who.h ../../functions/vim.h
editticket.o: ../../core/htmlfilter.h
editticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
editticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/stringconv.h
editticket.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
editticket.o: ../../core/mount.h ../../templates/misc.h
editticket.o: ../../templates/localefilter.h ../../templates/locale.h
editticket.o: ../../core/confparser.h ../../core/system.h
editticket.o: ../../functions/functions.h ../../functions/functionbase.h
editticket.o: ../../functions/functionparser.h ../../functions/adduser.h
editticket.o: ../../functions/cat.h ../../functions/chmod.h
editticket.o: ../../functions/privchanger.h ../../functions/chown.h
editticket.o: ../../functions/ckeditor.h ../../functions/cp.h
editticket.o: ../../functions/createthread.h ../../functions/default.h
editticket.o: ../../functions/download.h ../../functions/emacs.h
editticket.o: ../../functions/last.h ../../functions/login.h
editticket.o: ../../functions/logout.h ../../functions/ls.h
editticket.o: ../../functions/mkdir.h ../../functions/mv.h
editticket.o: ../../functions/node.h ../../functions/priv.h
editticket.o: ../../functions/reload.h ../../functions/rm.h
editticket.o: ../../functions/run.h ../../functions/stat.h
editticket.o: ../../functions/subject.h ../../functions/funthread.h
editticket.o: ../../functions/template.h ../../functions/tinymce.h
editticket.o: ../../functions/uname.h ../../functions/upload.h
editticket.o: ../../functions/uptime.h ../../functions/who.h
editticket.o: ../../functions/vim.h ../../core/htmlfilter.h
funticket.o: funticket.h tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
funticket.o: ../../db/dbtextstream.h ../../core/textstream.h
funticket.o: ../../core/error.h ../../core/log.h ticketinfo.h ticketparser.h
funticket.o: ticketconf.h ../../core/item.h ../../core/system.h
funticket.o: ../../core/dirs.h ../../core/item.h ../../core/dircontainer.h
funticket.o: ../../core/misc.h ../../core/item.h ../../core/error.h
funticket.o: ../../core/log.h ../../core/textstream.h ticketinfo.h
funticket.o: ticketparser.h ticketconf.h ../../core/item.h
funticket.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
funticket.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
funticket.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
funticket.o: ../../core/thread.h ../../core/dircontainer.h
@@ -101,62 +109,74 @@ funticket.o: ../../functions/functionbase.h ../../core/request.h
funticket.o: ../../core/requesttypes.h ../../core/session.h
funticket.o: ../../core/plugindata.h ../../core/config.h ../../core/notify.h
funticket.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h
funticket.o: ../../core/mount.h ../../core/locale.h ../../templates/misc.h
funticket.o: ../../templates/localefilter.h ../../core/locale.h
funticket.o: ../../core/system.h ../../core/misc.h
funticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
funticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/stringconv.h
funticket.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
funticket.o: ../../core/mount.h ../../templates/misc.h
funticket.o: ../../templates/localefilter.h ../../templates/locale.h
funticket.o: ../../core/confparser.h ../../core/system.h ../../core/misc.h
init.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
init.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/error.h
init.o: ../../core/log.h funticket.h ticketinfo.h ticketparser.h ticketconf.h
init.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
init.o: ../../core/item.h ../../core/dircontainer.h ../../db/db.h
init.o: ../../db/dbbase.h ../../db/dbitemquery.h ../../db/dbitemcolumns.h
init.o: ../../core/user.h ../../core/group.h ../../core/thread.h
init.o: ../../core/dircontainer.h ../../core/ugcontainer.h
init.o: ../../core/request.h ../../core/mounts.h ../../core/mount.h
init.o: ../../core/error.h ../../core/mountparser.h ../../core/config.h
init.o: ../../core/confparser.h ../../core/htmlfilter.h ../../core/users.h
init.o: ../../core/user.h ../../core/ugcontainer.h ../../core/lastcontainer.h
init.o: ../../core/groups.h ../../core/group.h ../../core/rebus.h
init.o: ../../core/loadavg.h ../../functions/functionbase.h
init.o: ../../core/request.h ../../core/requesttypes.h ../../core/session.h
init.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
init.o: ../../core/item.h ../../core/error.h ../../core/log.h
init.o: ../../core/textstream.h funticket.h ticketinfo.h ticketparser.h
init.o: ticketconf.h ../../core/item.h ../../core/system.h ../../core/dirs.h
init.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
init.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h ../../core/user.h
init.o: ../../core/group.h ../../core/thread.h ../../core/dircontainer.h
init.o: ../../core/ugcontainer.h ../../core/request.h ../../core/mounts.h
init.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
init.o: ../../core/config.h ../../core/confparser.h ../../core/htmlfilter.h
init.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
init.o: ../../core/lastcontainer.h ../../core/groups.h ../../core/group.h
init.o: ../../core/rebus.h ../../core/loadavg.h
init.o: ../../functions/functionbase.h ../../core/request.h
init.o: ../../core/requesttypes.h ../../core/session.h
init.o: ../../core/plugindata.h ../../core/config.h ../../core/notify.h
init.o: ../../templatesnotify/templatesnotify.h ../../../ezc/src/ezc.h
init.o: ../../core/mount.h ../../core/locale.h ../../templates/misc.h
init.o: ../../templates/localefilter.h ../../core/locale.h
init.o: ../../core/system.h editticket.h createticket.h ../../core/log.h
init.o: ../../core/plugin.h ../../core/pluginmsg.h
init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
init.o: ../../functions/functions.h ../../functions/functionbase.h
init.o: ../../functions/functionparser.h ../../functions/adduser.h
init.o: ../../functions/cat.h ../../functions/chmod.h
init.o: ../../functions/privchanger.h ../../functions/chown.h
init.o: ../../functions/ckeditor.h ../../functions/cp.h
init.o: ../../functions/createthread.h ../../functions/default.h
init.o: ../../functions/download.h ../../functions/emacs.h
init.o: ../../functions/last.h ../../functions/login.h
init.o: ../../functions/logout.h ../../functions/ls.h ../../functions/mkdir.h
init.o: ../../functions/mv.h ../../functions/node.h ../../functions/priv.h
init.o: ../../functions/reload.h ../../functions/rm.h ../../functions/run.h
init.o: ../../functions/stat.h ../../functions/subject.h
init.o: ../../functions/funthread.h ../../functions/template.h
init.o: ../../functions/tinymce.h ../../functions/uname.h
init.o: ../../functions/upload.h ../../functions/uptime.h
init.o: ../../functions/who.h ../../functions/vim.h ../../core/htmlfilter.h
init.o: ../../templates/templates.h ../../templates/misc.h
init.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/stringconv.h
init.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
init.o: ../../core/mount.h ../../templates/misc.h
init.o: ../../templates/localefilter.h ../../templates/locale.h
init.o: ../../core/confparser.h ../../core/system.h editticket.h
init.o: createticket.h ../../core/log.h ../../core/plugin.h
init.o: ../../core/pluginmsg.h ../../core/sessionmanager.h
init.o: ../../core/sessioncontainer.h ../../functions/functions.h
init.o: ../../functions/functionbase.h ../../functions/functionparser.h
init.o: ../../functions/adduser.h ../../functions/cat.h
init.o: ../../functions/chmod.h ../../functions/privchanger.h
init.o: ../../functions/chown.h ../../functions/ckeditor.h
init.o: ../../functions/cp.h ../../functions/createthread.h
init.o: ../../functions/default.h ../../functions/download.h
init.o: ../../functions/emacs.h ../../functions/last.h
init.o: ../../functions/login.h ../../functions/logout.h ../../functions/ls.h
init.o: ../../functions/mkdir.h ../../functions/mv.h ../../functions/node.h
init.o: ../../functions/priv.h ../../functions/reload.h ../../functions/rm.h
init.o: ../../functions/run.h ../../functions/stat.h
init.o: ../../functions/subject.h ../../functions/funthread.h
init.o: ../../functions/template.h ../../functions/tinymce.h
init.o: ../../functions/uname.h ../../functions/upload.h
init.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
init.o: ../../core/htmlfilter.h ../../templates/templates.h
init.o: ../../templates/patterncacher.h ../../core/item.h
init.o: ../../templates/ckeditorgetparser.h ../../core/httpsimpleparser.h
init.o: ../../core/log.h ../../templates/indexpatterns.h
init.o: ../../core/sessionmanager.h
tdb.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/error.h
tdb.o: ../../core/log.h ../../core/log.h
templates.o: ../../../ezc/src/ezc.h ticketinfo.h ticket.h ticketparser.h
templates.o: ticketconf.h ../../core/item.h ../../core/system.h
templates.o: ../../core/dirs.h ../../core/item.h ../../core/dircontainer.h
templates.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
templates.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
templates.o: ../../core/thread.h ../../core/dircontainer.h
templates.o: ../../core/ugcontainer.h ../../core/log.h ../../core/request.h
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
tdb.o: ../../core/item.h ../../core/error.h ../../core/log.h
tdb.o: ../../core/textstream.h ../../core/log.h
templates.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
templates.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
templates.o: ../../core/item.h ../../../ezc/src/stringconv.h
templates.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
templates.o: ticketinfo.h ticket.h ticketparser.h ticketconf.h
templates.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
templates.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
templates.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
templates.o: ../../core/user.h ../../core/group.h ../../core/thread.h
templates.o: ../../core/dircontainer.h ../../core/ugcontainer.h
templates.o: ../../core/log.h ../../core/textstream.h ../../core/request.h
templates.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
templates.o: ../../core/mountparser.h ../../core/config.h
templates.o: ../../core/confparser.h ../../core/htmlfilter.h
@@ -164,13 +184,13 @@ templates.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
templates.o: ../../core/lastcontainer.h ../../core/groups.h
templates.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h tdb.h
templates.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h
templates.o: ../../core/textstream.h ../../core/error.h editticket.h
templates.o: ../../functions/functionbase.h ../../core/request.h
templates.o: ../../core/textstream.h ../../core/misc.h ../../core/error.h
templates.o: editticket.h ../../functions/functionbase.h ../../core/request.h
templates.o: ../../core/requesttypes.h ../../core/session.h
templates.o: ../../core/plugindata.h ../../core/config.h ../../core/notify.h
templates.o: ../../templatesnotify/templatesnotify.h ../../core/mount.h
templates.o: ../../core/locale.h ../../templates/misc.h
templates.o: ../../templates/localefilter.h ../../core/locale.h
templates.o: ../../templates/misc.h ../../templates/localefilter.h
templates.o: ../../templates/locale.h ../../core/confparser.h
templates.o: ../../core/system.h createticket.h ../../core/misc.h
templates.o: ../../core/plugin.h ../../core/pluginmsg.h
templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
@@ -192,9 +212,8 @@ templates.o: ../../functions/template.h ../../functions/tinymce.h
templates.o: ../../functions/uname.h ../../functions/upload.h
templates.o: ../../functions/uptime.h ../../functions/who.h
templates.o: ../../functions/vim.h ../../core/htmlfilter.h
templates.o: ../../templates/templates.h ../../templates/misc.h
templates.o: ../../templates/patterncacher.h ../../core/item.h
templates.o: ../../templates/ckeditorgetparser.h
templates.o: ../../templates/templates.h ../../templates/patterncacher.h
templates.o: ../../core/item.h ../../templates/ckeditorgetparser.h
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
ticketconf.o: ticketconf.h
@@ -204,7 +223,8 @@ ticketinfo.o: ../../core/item.h ../../core/dircontainer.h ../../db/db.h
ticketinfo.o: ../../db/dbbase.h ../../db/dbitemquery.h
ticketinfo.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
ticketinfo.o: ../../core/thread.h ../../core/dircontainer.h
ticketinfo.o: ../../core/ugcontainer.h ../../core/log.h ../../core/request.h
ticketinfo.o: ../../core/ugcontainer.h ../../core/log.h
ticketinfo.o: ../../core/textstream.h ../../core/request.h
ticketinfo.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
ticketinfo.o: ../../core/mountparser.h ../../core/config.h
ticketinfo.o: ../../core/confparser.h ../../core/htmlfilter.h
@@ -213,5 +233,6 @@ ticketinfo.o: ../../core/lastcontainer.h ../../core/groups.h
ticketinfo.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
ticketinfo.o: tdb.h ../../db/dbbase.h ../../db/dbconn.h
ticketinfo.o: ../../db/dbtextstream.h ../../core/textstream.h
ticketinfo.o: ../../core/error.h ../../core/log.h ../../core/misc.h
ticketinfo.o: ../../core/misc.h ../../core/error.h ../../core/log.h
ticketinfo.o: ../../core/misc.h
ticketparser.o: ticketparser.h ticketconf.h ../../core/log.h

View File

@@ -17,7 +17,7 @@ namespace Ticket
CreateTicket::CreateTicket()
{
fun.url = "createticket";
fun.url = L"createticket";
}

View File

@@ -18,7 +18,7 @@ namespace Ticket
EditTicket::EditTicket()
{
fun.url = "editticket";
fun.url = L"editticket";
}

View File

@@ -21,7 +21,7 @@ namespace Ticket
FunTicket::FunTicket()
{
fun.url = "ticket";
fun.url = L"ticket";
}

View File

@@ -20,7 +20,7 @@ extern "C" void Init(PluginInfo &);
namespace Ticket
{
const char plugin_name[] = "ticket";
const wchar_t plugin_name[] = L"ticket";
TDb tdb;
TicketInfo ticket_info;
@@ -53,21 +53,22 @@ void AddMounts(PluginInfo & info)
{
Mounts & m = info.system->mounts;
ticket_info.mount_type_ticket = m.AddMountType("ticket");
ticket_info.mount_par_ticket = m.AddMountPar("ticket");
ticket_info.mount_par_ticket_conf = m.AddMountPar("ticket_conf");
ticket_info.mount_type_ticket = m.AddMountType(L"ticket");
ticket_info.mount_par_ticket = m.AddMountPar(L"ticket");
ticket_info.mount_par_ticket_conf = m.AddMountPar(L"ticket_conf");
ticket_info.mount_par_ticket_type = m.AddMountPar("ticket_type");
ticket_info.mount_par_ticket_type_default = m.AddMountPar("ticket_type_default");
ticket_info.mount_par_ticket_status = m.AddMountPar("ticket_status");
ticket_info.mount_par_ticket_status_default = m.AddMountPar("ticket_status_default");
ticket_info.mount_par_ticket_priority = m.AddMountPar("ticket_priority");
ticket_info.mount_par_ticket_priority_default = m.AddMountPar("ticket_priority_default");
ticket_info.mount_par_ticket_category = m.AddMountPar("ticket_category");
ticket_info.mount_par_ticket_category_default = m.AddMountPar("ticket_category_default");
ticket_info.mount_par_ticket_expected = m.AddMountPar("ticket_expected");
ticket_info.mount_par_ticket_expected_default = m.AddMountPar("ticket_expected_default");
ticket_info.mount_par_createticket_on = m.AddMountPar("createticket_on");
// !! bedzie do usuniecia
ticket_info.mount_par_ticket_type = m.AddMountPar(L"ticket_type");
ticket_info.mount_par_ticket_type_default = m.AddMountPar(L"ticket_type_default");
ticket_info.mount_par_ticket_status = m.AddMountPar(L"ticket_status");
ticket_info.mount_par_ticket_status_default = m.AddMountPar(L"ticket_status_default");
ticket_info.mount_par_ticket_priority = m.AddMountPar(L"ticket_priority");
ticket_info.mount_par_ticket_priority_default = m.AddMountPar(L"ticket_priority_default");
ticket_info.mount_par_ticket_category = m.AddMountPar(L"ticket_category");
ticket_info.mount_par_ticket_category_default = m.AddMountPar(L"ticket_category_default");
ticket_info.mount_par_ticket_expected = m.AddMountPar(L"ticket_expected");
ticket_info.mount_par_ticket_expected_default = m.AddMountPar(L"ticket_expected_default");
ticket_info.mount_par_createticket_on = m.AddMountPar(L"createticket_on");
}
@@ -83,7 +84,7 @@ void ProcessRequest(PluginInfo & info)
{
if( info.request->function == &info.functions->fun_reload )
{
if( info.request->IsParam("tickets") )
if( info.request->IsParam(L"tickets") )
ticket_info.ReadTicketConf();
}
}
@@ -97,7 +98,7 @@ void RemoveTicket(PluginInfo & i)
void InitTicket(PluginInfo & info)
{
ticket_info.progress_prefix = info.config->Text("ticket_form_progress_prefix", "progress");
ticket_info.progress_prefix = info.config->Text(L"ticket_form_progress_prefix", L"progress");
}
void AddEzcFunctions(PluginInfo & info);

View File

@@ -35,7 +35,7 @@ public:
private:
DbTextStream query;
std::string dir_list;
std::wstring dir_list;
};

View File

@@ -20,7 +20,6 @@
namespace Ticket
{
using Ezc::Info;
using namespace TemplatesFunctions;
using TemplatesFunctions::system;
@@ -360,8 +359,8 @@ void AddEzcFunctions(PluginInfo & info)
using namespace ns_tickets_tab;
using namespace ns_ticket_tab;
Ezc::Functions * fun = reinterpret_cast<Ezc::Functions*>(info.p1);
typedef Ezc::Functions<TextStream<std::wstring> > Fun;
Fun * fun = reinterpret_cast<Fun*>(info.p1);
fun->Insert("ticket_is", ticket_is);
fun->Insert("ticket_item_subject", ticket_item_subject);

View File

@@ -13,7 +13,7 @@ struct TicketConf
{
struct Select
{
std::string name;
std::wstring name;
int id;
};
@@ -25,7 +25,7 @@ struct TicketConf
int id;
std::string name;
std::wstring name;
Type type;
// used when type is TypeInteger

View File

@@ -124,7 +124,7 @@ void TicketInfo::DeleteAllMarkedConf()
}
bool TicketInfo::GetConfContent(const std::string & path)
bool TicketInfo::GetConfContent(const std::wstring & path)
{
long path_dir_id;
@@ -152,7 +152,7 @@ return true;
}
bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::string & path)
bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
{
log << log3 << "Ticket: parsing conf file: " << path << logend;
@@ -177,7 +177,7 @@ void TicketInfo::ReadTicketConf(Mounts & mounts, bool skip_existing_configs)
if( mount.param[mount_par_ticket_conf].defined &&
mount.param[mount_par_ticket_conf].arg.size() == 1 )
{
const std::string & file_name = mount.param[mount_par_ticket_conf].arg[0];
const std::wstring & file_name = mount.param[mount_par_ticket_conf].arg[0];
ConfTab::iterator c = conf_tab.find(mount.dir_id);
bool exists = (c != conf_tab.end() && c->second.file_name == file_name);
@@ -275,8 +275,8 @@ return false;
void TicketInfo::ReadTicketParams()
{
PostTab::iterator i;
const char parstr[] = "ticketparam"; // !! dodac do konfiga? i szablony tez niech bior<6F> z konfiga
size_t parlen = sizeof(parstr) / sizeof(char) - 1;
const wchar_t parstr[] = L"ticketparam"; // !! dodac do konfiga? i szablony tez niech bior<6F> z konfiga
size_t parlen = sizeof(parstr) / sizeof(wchar_t) - 1;
Ticket::TicketParam param;
ticket.par_tab.clear();
@@ -285,8 +285,8 @@ Ticket::TicketParam param;
{
if( IsSubString(parstr, i->first.c_str()) )
{
param.param = atoi(i->first.c_str() + parlen);
param.value = atoi(i->second.c_str());
param.param = Atoi(i->first.c_str() + parlen);
param.value = Atoi(i->second);
if( CheckMinMaxValue(param) )
ticket.par_tab.push_back(param);

View File

@@ -28,7 +28,7 @@ namespace Ticket
struct TicketConfWrap
{
bool to_delete;
std::string file_name;
std::wstring file_name;
TicketConf conf;
TicketConfWrap()
@@ -69,7 +69,7 @@ public:
// default: "progress"
// can be set in config in option: ticket_form_progress_prefix
std::string progress_prefix;
std::wstring progress_prefix;
int mount_type_ticket;
@@ -102,8 +102,8 @@ private:
Request * request;
TicketParser ticket_parser;
Item item_conf;
std::string path_dir;
std::string path_file;
std::wstring path_dir;
std::wstring path_file;
// for cur_conf_wrap and cur_conf
const TicketConfWrap cur_conf_wrap_empty;
@@ -111,8 +111,8 @@ private:
static bool SortTicketsFun(const Ticket & t1, const Ticket & t2);
bool GetConfContent(const std::string & path);
bool ParseTicketConf(long mount_dir_id, const std::string & path);
bool GetConfContent(const std::wstring & path);
bool ParseTicketConf(long mount_dir_id, const std::wstring & path);
void ReadTicketConf(Mounts & mounts, bool skip_existing_configs);
void MarkAllConfToDelete();
void DeleteAllMarkedConf();

View File

@@ -39,7 +39,7 @@ void TicketParser::SkipWhiteLines()
}
void TicketParser::ReadTextQuoted(std::string & text)
void TicketParser::ReadTextQuoted(std::wstring & text)
{
pchar += 1;
@@ -57,7 +57,7 @@ void TicketParser::ReadTextQuoted(std::string & text)
}
void TicketParser::ReadTextSimple(std::string & text, bool comma_separator)
void TicketParser::ReadTextSimple(std::wstring & text, bool comma_separator)
{
while( *pchar!=0 && *pchar!=10 && !IsWhite(*pchar) && *pchar!='(' && *pchar!=')' &&
(!comma_separator || *pchar!=',' ) )
@@ -68,7 +68,7 @@ void TicketParser::ReadTextSimple(std::string & text, bool comma_separator)
}
void TicketParser::ReadText(std::string & text, bool comma_separator)
void TicketParser::ReadText(std::wstring & text, bool comma_separator)
{
SkipWhite();
text.clear();
@@ -96,10 +96,10 @@ void TicketParser::CheckId(int & id, bool & def)
{
ReadText(id_str, true);
if( id_str == "def" )
if( id_str == L"def" )
def = true;
else
id = atoi(id_str.c_str());
id = Atoi(id_str);
if( *pchar == ',' )
pchar += 1;
@@ -118,10 +118,10 @@ bool TicketParser::ReadItemType()
if( type.empty() )
return false;
if( type == "integer" )
if( type == L"integer" )
item.type = TicketConf::TicketItem::TypeInteger;
else
if( type == "select" )
if( type == L"select" )
item.type = TicketConf::TicketItem::TypeSelect;
else
{
@@ -165,10 +165,10 @@ void TicketParser::ReadItemInteger()
ReadText(int_max);
if( !int_min.empty() )
item.integer_min = atoi(int_min.c_str());
item.integer_min = Atoi(int_min);
if( !int_max.empty() )
item.integer_max = atoi(int_max.c_str());
item.integer_max = Atoi(int_max);
}
@@ -278,7 +278,7 @@ void TicketParser::LogItem(TicketConf::TicketItem & item)
}
int TicketParser::Parse(const char * str, TicketConf & conf)
int TicketParser::Parse(const wchar_t * str, TicketConf & conf)
{
pchar = str;
pconf = &conf;
@@ -302,7 +302,7 @@ return error;
int TicketParser::Parse(const std::string & str, TicketConf & conf)
int TicketParser::Parse(const std::wstring & str, TicketConf & conf)
{
return Parse(str.c_str(), conf);
}

View File

@@ -15,27 +15,27 @@ class TicketParser
{
public:
int Parse(const char * str, TicketConf & conf);
int Parse(const std::string & str, TicketConf & conf);
int Parse(const wchar_t * str, TicketConf & conf);
int Parse(const std::wstring & str, TicketConf & conf);
private:
TicketConf * pconf;
const char * pchar;
const wchar_t * pchar;
int error; // last error code
TicketConf::TicketItem item;
std::string type;
std::string id_str;
std::string int_min, int_max;
std::wstring type;
std::wstring id_str;
std::wstring int_min, int_max;
TicketConf::TicketItem::Select select;
bool IsWhite(int c);
void SkipWhite();
void SkipWhiteLines();
void SkipLine();
void ReadTextQuoted(std::string & text);
void ReadTextSimple(std::string & text, bool comma_separator);
void ReadText(std::string & text, bool comma_separator = false);
void ReadTextQuoted(std::wstring & text);
void ReadTextSimple(std::wstring & text, bool comma_separator);
void ReadText(std::wstring & text, bool comma_separator = false);
void CheckId(int & id, bool & def);
void SetItemId();