From ad9d6f43018dce1e0b941d94d809597877f75eb5 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 6 Dec 2010 00:25:46 +0000 Subject: [PATCH] db: core/user table has only 'notify' column now (previous was cms_notify, thread_notify) added: notifications for tickets (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@688 e52654a7-88a9-db11-a3e9-0013d4bc506e --- core/Makefile.dep | 61 +++++++------- core/app.cpp | 2 + core/plugin.cpp | 10 ++- core/plugin.h | 4 + core/pluginmsg.h | 15 ++++ core/user.h | 8 +- db/db.cpp | 15 ++-- functions/Makefile.dep | 141 ++++++++++++++++++-------------- functions/functionbase.cpp | 6 ++ functions/functionbase.h | 3 + functions/functions.cpp | 7 ++ functions/functions.h | 2 + locale/en | 1 - locale/pl | 1 - main/Makefile.dep | 26 +++--- notify/Makefile.dep | 57 ++++++++++++- notify/notify.cpp | 13 ++- notify/notify.h | 1 + notify/notifypool.h | 14 ++++ notify/notifythread.cpp | 14 ++-- notify/templatesnotify.cpp | 4 +- plugins/stats/Makefile.dep | 77 ++++++++--------- plugins/ticket/Makefile.dep | 93 ++++++++++----------- plugins/ticket/createticket.cpp | 14 +++- plugins/ticket/createticket.h | 3 + plugins/ticket/init.cpp | 10 ++- plugins/ticket/ticketinfo.h | 4 + templates/Makefile.dep | 72 ++++++++-------- txt/notify_email_ticket.txt | 23 +----- 29 files changed, 432 insertions(+), 269 deletions(-) diff --git a/core/Makefile.dep b/core/Makefile.dep index d800fe9..a183d9b 100755 --- a/core/Makefile.dep +++ b/core/Makefile.dep @@ -19,19 +19,19 @@ app.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h app.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h users.h app.o: groups.h group.h loadavg.h sessionmanager.h sessioncontainer.h app.o: ../functions/functions.h ../functions/functionbase.h ../core/request.h -app.o: ../core/system.h ../functions/functionparser.h ../functions/adduser.h -app.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -app.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h -app.o: ../functions/createthread.h ../functions/default.h -app.o: ../functions/download.h ../functions/emacs.h ../functions/last.h -app.o: ../functions/login.h ../functions/logout.h ../functions/ls.h -app.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h -app.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h -app.o: ../functions/run.h ../functions/stat.h ../functions/subject.h -app.o: ../functions/funthread.h ../functions/template.h -app.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h -app.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h -app.o: ../core/htmlfilter.h ../templates/templates.h +app.o: ../core/system.h ../core/synchro.h ../functions/functionparser.h +app.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +app.o: ../functions/privchanger.h ../functions/chown.h +app.o: ../functions/ckeditor.h ../functions/cp.h ../functions/createthread.h +app.o: ../functions/default.h ../functions/download.h ../functions/emacs.h +app.o: ../functions/last.h ../functions/login.h ../functions/logout.h +app.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h +app.o: ../functions/node.h ../functions/priv.h ../functions/reload.h +app.o: ../functions/rm.h ../functions/run.h ../functions/stat.h +app.o: ../functions/subject.h ../functions/funthread.h +app.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h +app.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h +app.o: ../functions/vim.h ../core/htmlfilter.h ../templates/templates.h app.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h app.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h app.o: ../core/sessionmanager.h compress.h getparser.h httpsimpleparser.h @@ -60,9 +60,10 @@ config.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h config.o: mounts.h mount.h mountparser.h users.h groups.h group.h loadavg.h config.o: sessionmanager.h sessioncontainer.h ../functions/functions.h config.o: ../functions/functionbase.h ../core/request.h ../core/system.h -config.o: ../functions/functionparser.h ../functions/adduser.h -config.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -config.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +config.o: ../core/synchro.h ../functions/functionparser.h +config.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +config.o: ../functions/privchanger.h ../functions/chown.h +config.o: ../functions/ckeditor.h ../functions/cp.h config.o: ../functions/createthread.h ../functions/default.h config.o: ../functions/download.h ../functions/emacs.h ../functions/last.h config.o: ../functions/login.h ../functions/logout.h ../functions/ls.h @@ -157,10 +158,10 @@ mounts.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h mounts.o: mountparser.h plugin.h pluginmsg.h system.h users.h groups.h mounts.o: group.h loadavg.h sessionmanager.h sessioncontainer.h mounts.o: ../functions/functions.h ../functions/functionbase.h -mounts.o: ../core/request.h ../core/system.h ../functions/functionparser.h -mounts.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h -mounts.o: ../functions/privchanger.h ../functions/chown.h -mounts.o: ../functions/ckeditor.h ../functions/cp.h +mounts.o: ../core/request.h ../core/system.h ../core/synchro.h +mounts.o: ../functions/functionparser.h ../functions/adduser.h +mounts.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h +mounts.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h mounts.o: ../functions/createthread.h ../functions/default.h mounts.o: ../functions/download.h ../functions/emacs.h ../functions/last.h mounts.o: ../functions/login.h ../functions/logout.h ../functions/ls.h @@ -194,9 +195,10 @@ plugin.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h plugin.o: mounts.h mount.h mountparser.h users.h groups.h group.h loadavg.h plugin.o: sessionmanager.h sessioncontainer.h ../functions/functions.h plugin.o: ../functions/functionbase.h ../core/request.h ../core/system.h -plugin.o: ../functions/functionparser.h ../functions/adduser.h -plugin.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -plugin.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +plugin.o: ../core/synchro.h ../functions/functionparser.h +plugin.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +plugin.o: ../functions/privchanger.h ../functions/chown.h +plugin.o: ../functions/ckeditor.h ../functions/cp.h plugin.o: ../functions/createthread.h ../functions/default.h plugin.o: ../functions/download.h ../functions/emacs.h ../functions/last.h plugin.o: ../functions/login.h ../functions/logout.h ../functions/ls.h @@ -231,8 +233,8 @@ plugindata.o: ugcontainer.h lastcontainer.h mounts.h mount.h mountparser.h plugindata.o: users.h groups.h group.h loadavg.h sessionmanager.h plugindata.o: sessioncontainer.h ../functions/functions.h plugindata.o: ../functions/functionbase.h ../core/request.h ../core/system.h -plugindata.o: ../functions/functionparser.h ../functions/adduser.h -plugindata.o: ../functions/cat.h ../functions/chmod.h +plugindata.o: ../core/synchro.h ../functions/functionparser.h +plugindata.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h plugindata.o: ../functions/privchanger.h ../functions/chown.h plugindata.o: ../functions/ckeditor.h ../functions/cp.h plugindata.o: ../functions/createthread.h ../functions/default.h @@ -275,9 +277,10 @@ request.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h request.o: mounts.h mount.h mountparser.h users.h groups.h group.h loadavg.h request.o: sessionmanager.h sessioncontainer.h ../functions/functions.h request.o: ../functions/functionbase.h ../core/request.h ../core/system.h -request.o: ../functions/functionparser.h ../functions/adduser.h -request.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -request.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +request.o: ../core/synchro.h ../functions/functionparser.h +request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +request.o: ../functions/privchanger.h ../functions/chown.h +request.o: ../functions/ckeditor.h ../functions/cp.h request.o: ../functions/createthread.h ../functions/default.h request.o: ../functions/download.h ../functions/emacs.h ../functions/last.h request.o: ../functions/login.h ../functions/logout.h ../functions/ls.h @@ -320,7 +323,7 @@ sessionmanager.o: ../core/config.h ../core/users.h ugcontainer.h mounts.h sessionmanager.o: mount.h mountparser.h users.h groups.h group.h loadavg.h sessionmanager.o: sessionparser.h plugin.h pluginmsg.h sessionmanager.o: ../functions/functions.h ../functions/functionbase.h -sessionmanager.o: ../core/request.h ../core/system.h +sessionmanager.o: ../core/request.h ../core/system.h ../core/synchro.h sessionmanager.o: ../functions/functionparser.h ../functions/adduser.h sessionmanager.o: ../functions/cat.h ../functions/chmod.h sessionmanager.o: ../functions/privchanger.h ../functions/chown.h diff --git a/core/app.cpp b/core/app.cpp index 3b1fb36..781fbe6 100755 --- a/core/app.cpp +++ b/core/app.cpp @@ -39,6 +39,7 @@ App::App() plugin.SetSystem(&system); plugin.SetFunctions(&functions); plugin.SetTemplates(&templates); + plugin.SetSynchro(&synchro); plugin.SetSessionManager(&session_manager); request.SetConfig(&config); @@ -48,6 +49,7 @@ App::App() functions.SetDb(&db); functions.SetSystem(&system); functions.SetTemplates(&templates); + functions.SetSynchro(&synchro); system.SetConfig(&config); system.SetRequest(&request); diff --git a/core/plugin.cpp b/core/plugin.cpp index 81edaf1..7271ccd 100755 --- a/core/plugin.cpp +++ b/core/plugin.cpp @@ -40,6 +40,7 @@ Plugin::Plugin() system = 0; functions = 0; templates = 0; + synchro = 0; session_manager = 0; } @@ -85,6 +86,12 @@ void Plugin::SetTemplates(Templates * ptemplates) } +void Plugin::SetSynchro(Synchro * psynchro) +{ + synchro = psynchro; +} + + void Plugin::SetSessionManager(SessionManager * psession_manager) { session_manager = psession_manager; @@ -96,7 +103,7 @@ void Plugin::SetSessionManager(SessionManager * psession_manager) bool Plugin::SetPointers(PluginInfo & info) { // for safety we call a plugin function only when all our pointers are not null - bool res = (db && config && request && system && functions && templates && session_manager); + bool res = (db && config && request && system && functions && templates && synchro && session_manager); if( !res ) log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend; @@ -107,6 +114,7 @@ bool Plugin::SetPointers(PluginInfo & info) info.system = system; info.functions = functions; info.templates = templates; + info.synchro = synchro; info.session_manager = session_manager; return res; diff --git a/core/plugin.h b/core/plugin.h index c49406d..fb7d37d 100755 --- a/core/plugin.h +++ b/core/plugin.h @@ -21,6 +21,7 @@ #include "request.h" #include "system.h" #include "sessionmanager.h" +#include "synchro.h" #include "functions/functions.h" #include "templates/templates.h" @@ -63,6 +64,7 @@ struct PluginInfo System * system; Functions * functions; Templates * templates; + Synchro * synchro; SessionManager * session_manager; // pointer to the plugin session (can be null if not set by the plugin) @@ -132,6 +134,7 @@ public: void SetSystem(System * psystem); void SetFunctions(Functions * pfunctions); void SetTemplates(Templates * ptemplates); + void SetSynchro(Synchro * psynchro); void SetSessionManager(SessionManager * psession_manager); void LoadPlugin(const char * filename); @@ -171,6 +174,7 @@ private: System * system; Functions * functions; Templates * templates; + Synchro * synchro; SessionManager * session_manager; std::wstring temp_path; diff --git a/core/pluginmsg.h b/core/pluginmsg.h index c168ceb..d718bb2 100755 --- a/core/pluginmsg.h +++ b/core/pluginmsg.h @@ -15,6 +15,17 @@ // PluginInfo.p1 is a pointer to Ezc::Functions object #define WINIX_TEMPLATES_CREATEFUNCTIONS 999 +// here you can add your own EZC functions to notify system +// warning: this functions will be called from an other thread +// so you should use synchro->Lock() and synchro->Unlock() +// when attempting to winix objects +// PluginInfo.p1 is a pointer to Ezc::Functions object +// which is defined as: +// Ezc::Functions ezc_functions; +// and Notify Stream is: +// typedef TextStream NotifyStream; +#define WINIX_NOTIFY_TEMPLATES_CREATEFUNCTIONS 998 + // winix function and parameters have been parsed // the request.status is OK // (the winix function was not called yet) @@ -76,6 +87,10 @@ // now we have new mount points #define WINIX_FSTAB_CHANGED 3012 +// here you add your own template to notification system +// call system->notify.AddTemplate() method +// with a template file name +#define WINIX_NOTIFY_ADD_TEMPLATE 3013 #endif diff --git a/core/user.h b/core/user.h index 36ac120..2f69ed5 100755 --- a/core/user.h +++ b/core/user.h @@ -21,9 +21,8 @@ struct User bool super_user; std::vector groups; std::wstring email; - - int cms_notify; // !! bedziemy tylko jedno notify wykorzystywac (zmienic nazwe na notify) - int thread_notify; + int notify; + // !! currently all users have the same offset // option in config: time_zone_offset @@ -44,8 +43,7 @@ struct User super_user = false; groups.clear(); email.clear(); - cms_notify = 0; - thread_notify = 0; + notify = 0; time_zone_offset = 0; } diff --git a/db/db.cpp b/db/db.cpp index 45eb939..854a7f1 100755 --- a/db/db.cpp +++ b/db/db.cpp @@ -68,13 +68,12 @@ Error Db::AddUser(User & user, const std::wstring & password) try { query.Clear(); - query << R("insert into core.user (login, password, super_user, email, cms_notify, thread_notify) values (") + query << R("insert into core.user (login, password, super_user, email, notify) values (") << user.name << password << static_cast(user.super_user) << user.email - << user.cms_notify - << user.thread_notify + << user.notify << R(");"); r = AssertQuery(query); @@ -1295,7 +1294,7 @@ void Db::GetUsers(UGContainer & user_tab) try { query.Clear(); - query << R("select id, login, super_user, group_id, email, cms_notify, thread_notify" + query << R("select id, login, super_user, group_id, email, notify" " from core.user left outer join core.group_mem on" " core.user.id = core.group_mem.user_id order by id asc;"); @@ -1308,9 +1307,8 @@ void Db::GetUsers(UGContainer & user_tab) int cname = AssertColumn(r, "login"); int csuper_user = AssertColumn(r, "super_user"); int cgroup_id = AssertColumn(r, "group_id"); - int cemail = AssertColumn(r, "email"); - int ccms_notify = AssertColumn(r, "cms_notify"); - int cthread_notify = AssertColumn(r, "thread_notify"); + int cemail = AssertColumn(r, "email"); + int cnotify = AssertColumn(r, "notify"); User u; long last_id = -1; @@ -1325,8 +1323,7 @@ void Db::GetUsers(UGContainer & user_tab) u.name = AssertValueWide(r, i, cname); u.super_user = static_cast(AssertValueInt(r, i, csuper_user)); u.email = AssertValueWide(r, i, cemail); - u.cms_notify = AssertValueInt(r, i, ccms_notify); - u.thread_notify = AssertValueInt(r, i, cthread_notify); + u.notify = AssertValueInt(r, i, cnotify); log << log1 << "Db: get user: id:" << u.id << ", name:" << u.name << ", super_user:" << u.super_user << logend; diff --git a/functions/Makefile.dep b/functions/Makefile.dep index 1de12ec..06868db 100755 --- a/functions/Makefile.dep +++ b/functions/Makefile.dep @@ -26,6 +26,7 @@ adduser.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h adduser.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h adduser.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h adduser.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +adduser.o: ../core/synchro.h cat.o: cat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h cat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h cat.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -49,7 +50,7 @@ cat.o: ../templates/htmltextstream.h ../notify/notifythread.h cat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h cat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h cat.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -cat.o: ../core/groups.h ../core/group.h ../core/loadavg.h +cat.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h chmod.o: chmod.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h chmod.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h chmod.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -75,6 +76,7 @@ chmod.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h chmod.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h chmod.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h chmod.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +chmod.o: ../core/synchro.h chown.o: chown.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h chown.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h chown.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -100,6 +102,7 @@ chown.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h chown.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h chown.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h chown.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +chown.o: ../core/synchro.h ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../db/db.h ckeditor.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ckeditor.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -127,7 +130,7 @@ ckeditor.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h ckeditor.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h ckeditor.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h ckeditor.o: ../core/mountparser.h ../core/users.h ../core/groups.h -ckeditor.o: ../core/group.h ../core/loadavg.h +ckeditor.o: ../core/group.h ../core/loadavg.h ../core/synchro.h cp.o: cp.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h cp.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h cp.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h @@ -151,7 +154,8 @@ cp.o: ../templates/htmltextstream.h ../notify/notifythread.h cp.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h cp.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h cp.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -cp.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/misc.h +cp.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h +cp.o: ../core/misc.h createthread.o: createthread.h functionbase.h ../core/item.h ../db/db.h createthread.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h createthread.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -181,7 +185,7 @@ createthread.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h createthread.o: ../core/ugcontainer.h ../core/lastcontainer.h createthread.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h createthread.o: ../core/users.h ../core/groups.h ../core/group.h -createthread.o: ../core/loadavg.h +createthread.o: ../core/loadavg.h ../core/synchro.h default.o: default.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h default.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h default.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -208,6 +212,7 @@ default.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h default.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h default.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h default.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +default.o: ../core/synchro.h download.o: download.h functionbase.h ../core/item.h ../db/db.h download.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h download.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -235,7 +240,7 @@ download.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h download.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h download.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h download.o: ../core/mountparser.h ../core/users.h ../core/groups.h -download.o: ../core/group.h ../core/loadavg.h +download.o: ../core/group.h ../core/loadavg.h ../core/synchro.h emacs.o: emacs.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h emacs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h emacs.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -261,9 +266,10 @@ emacs.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h emacs.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h emacs.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h emacs.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h -emacs.o: ../templates/templates.h ../templates/patterncacher.h -emacs.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -emacs.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h +emacs.o: ../core/synchro.h ../templates/templates.h +emacs.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h +emacs.o: ../core/httpsimpleparser.h ../core/log.h +emacs.o: ../templates/indexpatterns.h ../core/sessionmanager.h emacs.o: ../core/sessioncontainer.h ../core/system.h functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h @@ -294,7 +300,7 @@ functionbase.o: ../notify/templatesnotify.h ../core/users.h functionbase.o: ../core/ugcontainer.h ../core/lastcontainer.h functionbase.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h functionbase.o: ../core/users.h ../core/groups.h ../core/group.h -functionbase.o: ../core/loadavg.h +functionbase.o: ../core/loadavg.h ../core/synchro.h functionparser.o: functionparser.h ../core/request.h ../core/requesttypes.h functionparser.o: ../core/session.h ../core/item.h ../core/error.h functionparser.o: ../core/user.h ../core/plugindata.h ../core/rebus.h @@ -312,19 +318,20 @@ functionparser.o: ../core/confparser.h ../templates/misc.h functionparser.o: ../templates/localefilter.h ../templates/locale.h functionparser.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h functionparser.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h -functionparser.o: functions.h functionbase.h ../core/config.h adduser.h cat.h -functionparser.o: chmod.h privchanger.h chown.h ckeditor.h cp.h -functionparser.o: createthread.h default.h download.h emacs.h last.h login.h -functionparser.o: logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h -functionparser.o: run.h stat.h subject.h funthread.h template.h tinymce.h -functionparser.o: uname.h upload.h uptime.h who.h vim.h ../core/htmlfilter.h -functionparser.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h -functionparser.o: ../notify/notifythread.h ../core/basethread.h -functionparser.o: ../core/synchro.h ../notify/templatesnotify.h -functionparser.o: ../core/users.h ../core/ugcontainer.h -functionparser.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h -functionparser.o: ../core/mountparser.h ../core/users.h ../core/groups.h -functionparser.o: ../core/group.h ../core/loadavg.h ../core/log.h +functionparser.o: functions.h functionbase.h ../core/config.h +functionparser.o: ../core/synchro.h adduser.h cat.h chmod.h privchanger.h +functionparser.o: chown.h ckeditor.h cp.h createthread.h default.h download.h +functionparser.o: emacs.h last.h login.h logout.h ls.h mkdir.h mv.h node.h +functionparser.o: priv.h reload.h rm.h run.h stat.h subject.h funthread.h +functionparser.o: template.h tinymce.h uname.h upload.h uptime.h who.h vim.h +functionparser.o: ../core/htmlfilter.h ../../ezc/src/stringconv.h +functionparser.o: ../templates/htmltextstream.h ../notify/notifythread.h +functionparser.o: ../core/basethread.h ../core/synchro.h +functionparser.o: ../notify/templatesnotify.h ../core/users.h +functionparser.o: ../core/ugcontainer.h ../core/lastcontainer.h +functionparser.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h +functionparser.o: ../core/users.h ../core/groups.h ../core/group.h +functionparser.o: ../core/loadavg.h ../core/log.h functions.o: functions.h functionbase.h ../core/item.h ../db/db.h functions.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h functions.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -348,18 +355,18 @@ functions.o: ../notify/templatesnotify.h ../core/users.h functions.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/mounts.h functions.o: ../core/mount.h ../core/mountparser.h ../core/users.h functions.o: ../core/groups.h ../core/group.h ../core/loadavg.h -functions.o: functionparser.h adduser.h cat.h chmod.h privchanger.h chown.h -functions.o: ckeditor.h cp.h createthread.h default.h download.h emacs.h -functions.o: last.h login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h -functions.o: rm.h run.h stat.h subject.h funthread.h template.h tinymce.h -functions.o: uname.h upload.h uptime.h who.h vim.h ../core/htmlfilter.h -functions.o: ../core/log.h ../core/misc.h ../core/plugin.h -functions.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h -functions.o: ../core/sessioncontainer.h ../functions/functions.h -functions.o: ../templates/templates.h ../templates/patterncacher.h -functions.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -functions.o: ../core/log.h ../templates/indexpatterns.h -functions.o: ../core/sessionmanager.h +functions.o: ../core/synchro.h functionparser.h adduser.h cat.h chmod.h +functions.o: privchanger.h chown.h ckeditor.h cp.h createthread.h default.h +functions.o: download.h emacs.h last.h login.h logout.h ls.h mkdir.h mv.h +functions.o: node.h priv.h reload.h rm.h run.h stat.h subject.h funthread.h +functions.o: template.h tinymce.h uname.h upload.h uptime.h who.h vim.h +functions.o: ../core/htmlfilter.h ../core/log.h ../core/misc.h +functions.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h +functions.o: ../core/sessionmanager.h ../core/sessioncontainer.h +functions.o: ../functions/functions.h ../templates/templates.h +functions.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h +functions.o: ../core/httpsimpleparser.h ../core/log.h +functions.o: ../templates/indexpatterns.h ../core/sessionmanager.h funthread.o: ../core/misc.h funthread.h functionbase.h ../core/item.h funthread.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h funthread.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -388,6 +395,7 @@ funthread.o: ../notify/templatesnotify.h ../core/users.h funthread.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/mounts.h funthread.o: ../core/mount.h ../core/mountparser.h ../core/users.h funthread.o: ../core/groups.h ../core/group.h ../core/loadavg.h +funthread.o: ../core/synchro.h last.o: last.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h last.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h last.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -413,6 +421,7 @@ last.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h last.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h last.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h last.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +last.o: ../core/synchro.h login.o: login.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h login.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h login.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -438,6 +447,7 @@ login.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h login.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h login.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h login.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +login.o: ../core/synchro.h logout.o: logout.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h logout.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h logout.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -464,6 +474,7 @@ logout.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h logout.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h logout.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h logout.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +logout.o: ../core/synchro.h ls.o: ls.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h ls.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h ls.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h @@ -487,7 +498,7 @@ ls.o: ../templates/htmltextstream.h ../notify/notifythread.h ls.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h ls.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h ls.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -ls.o: ../core/groups.h ../core/group.h ../core/loadavg.h +ls.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h mkdir.o: mkdir.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h mkdir.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h mkdir.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -513,6 +524,7 @@ mkdir.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h mkdir.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h mkdir.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h mkdir.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +mkdir.o: ../core/synchro.h mv.o: mv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h mv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h mv.o: ../core/item.h ../core/error.h ../core/log.h ../core/textstream.h @@ -536,7 +548,7 @@ mv.o: ../templates/htmltextstream.h ../notify/notifythread.h mv.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h mv.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h mv.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -mv.o: ../core/groups.h ../core/group.h ../core/loadavg.h +mv.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h node.o: node.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h node.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h node.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -562,6 +574,7 @@ node.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h node.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h node.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h node.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +node.o: ../core/synchro.h priv.o: priv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h priv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h priv.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -587,6 +600,7 @@ priv.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h priv.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h priv.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h priv.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +priv.o: ../core/synchro.h privchanger.o: privchanger.h ../core/request.h ../core/requesttypes.h privchanger.o: ../core/session.h ../core/item.h ../core/error.h privchanger.o: ../core/user.h ../core/plugindata.h ../core/rebus.h @@ -604,15 +618,15 @@ privchanger.o: ../core/confparser.h ../templates/misc.h privchanger.o: ../templates/localefilter.h ../templates/locale.h privchanger.o: ../../ezc/src/ezc.h ../../ezc/src/utf8.h privchanger.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h functions.h -privchanger.o: functionbase.h ../core/config.h functionparser.h adduser.h -privchanger.o: cat.h chmod.h chown.h ckeditor.h cp.h createthread.h default.h -privchanger.o: download.h emacs.h last.h login.h logout.h ls.h mkdir.h mv.h -privchanger.o: node.h priv.h reload.h rm.h run.h stat.h subject.h funthread.h -privchanger.o: template.h tinymce.h uname.h upload.h uptime.h who.h vim.h -privchanger.o: ../core/htmlfilter.h ../../ezc/src/stringconv.h -privchanger.o: ../templates/htmltextstream.h ../notify/notifythread.h -privchanger.o: ../core/basethread.h ../core/synchro.h -privchanger.o: ../notify/templatesnotify.h ../core/users.h +privchanger.o: functionbase.h ../core/config.h ../core/synchro.h +privchanger.o: functionparser.h adduser.h cat.h chmod.h chown.h ckeditor.h +privchanger.o: cp.h createthread.h default.h download.h emacs.h last.h +privchanger.o: login.h logout.h ls.h mkdir.h mv.h node.h priv.h reload.h rm.h +privchanger.o: run.h stat.h subject.h funthread.h template.h tinymce.h +privchanger.o: uname.h upload.h uptime.h who.h vim.h ../core/htmlfilter.h +privchanger.o: ../../ezc/src/stringconv.h ../templates/htmltextstream.h +privchanger.o: ../notify/notifythread.h ../core/basethread.h +privchanger.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h ../core/mounts.h privchanger.o: ../core/mount.h ../core/mountparser.h ../core/users.h privchanger.o: ../core/groups.h ../core/group.h ../core/loadavg.h @@ -642,9 +656,10 @@ reload.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h reload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h reload.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h reload.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h -reload.o: ../templates/templates.h ../templates/patterncacher.h -reload.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -reload.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h +reload.o: ../core/synchro.h ../templates/templates.h +reload.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h +reload.o: ../core/httpsimpleparser.h ../core/log.h +reload.o: ../templates/indexpatterns.h ../core/sessionmanager.h reload.o: ../core/sessioncontainer.h ../core/system.h rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h @@ -669,13 +684,13 @@ rm.o: ../templates/htmltextstream.h ../notify/notifythread.h rm.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h rm.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h rm.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -rm.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/plugin.h -rm.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h -rm.o: ../core/sessioncontainer.h ../functions/functions.h -rm.o: ../templates/templates.h ../templates/patterncacher.h -rm.o: ../templates/ckeditorgetparser.h ../core/httpsimpleparser.h -rm.o: ../core/log.h ../templates/indexpatterns.h ../core/sessionmanager.h -rm.o: ../core/misc.h +rm.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h +rm.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h +rm.o: ../core/sessionmanager.h ../core/sessioncontainer.h +rm.o: ../functions/functions.h ../templates/templates.h +rm.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h +rm.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h +rm.o: ../core/sessionmanager.h ../core/misc.h run.o: run.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h run.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h run.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -699,7 +714,7 @@ run.o: ../templates/htmltextstream.h ../notify/notifythread.h run.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h run.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h run.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h ../core/users.h -run.o: ../core/groups.h ../core/group.h ../core/loadavg.h +run.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/synchro.h stat.o: stat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h stat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h stat.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -725,6 +740,7 @@ stat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h stat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h stat.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h stat.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +stat.o: ../core/synchro.h subject.o: subject.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h subject.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h subject.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -751,6 +767,7 @@ subject.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h subject.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h subject.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h subject.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +subject.o: ../core/synchro.h template.o: template.h functionbase.h ../core/item.h ../db/db.h template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h template.o: ../core/textstream.h ../core/misc.h ../core/item.h @@ -778,7 +795,8 @@ template.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h template.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h template.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h template.o: ../core/mountparser.h ../core/users.h ../core/groups.h -template.o: ../core/group.h ../core/loadavg.h ../core/misc.h +template.o: ../core/group.h ../core/loadavg.h ../core/synchro.h +template.o: ../core/misc.h tinymce.o: tinymce.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h tinymce.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h tinymce.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -805,6 +823,7 @@ tinymce.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h tinymce.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h tinymce.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h tinymce.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +tinymce.o: ../core/synchro.h uname.o: uname.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h uname.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h uname.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -830,6 +849,7 @@ uname.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h uname.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h uname.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h uname.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +uname.o: ../core/synchro.h upload.o: upload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h upload.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -856,7 +876,7 @@ upload.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h upload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h upload.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h upload.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h -upload.o: ../core/misc.h ../functions/functions.h +upload.o: ../core/synchro.h ../core/misc.h ../functions/functions.h uptime.o: uptime.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h uptime.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -883,6 +903,7 @@ uptime.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h uptime.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h uptime.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h uptime.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h +uptime.o: ../core/synchro.h vim.o: vim.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h vim.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h vim.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -907,7 +928,7 @@ vim.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h vim.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h vim.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h vim.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h -vim.o: ../core/loadavg.h +vim.o: ../core/loadavg.h ../core/synchro.h who.o: who.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h who.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h who.o: ../core/misc.h ../core/item.h ../core/error.h ../core/log.h @@ -932,4 +953,4 @@ who.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h who.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h who.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h who.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h -who.o: ../core/loadavg.h +who.o: ../core/loadavg.h ../core/synchro.h diff --git a/functions/functionbase.cpp b/functions/functionbase.cpp index 9156b58..64d67d1 100755 --- a/functions/functionbase.cpp +++ b/functions/functionbase.cpp @@ -62,6 +62,12 @@ void FunctionBase::SetTemplates(Templates * ptemplates) } +void FunctionBase::SetSynchro(Synchro * psynchro) +{ + synchro = psynchro; +} + + void FunctionBase::Init() { // this method is called only once at the beginning diff --git a/functions/functionbase.h b/functions/functionbase.h index 001fa89..d66fe63 100755 --- a/functions/functionbase.h +++ b/functions/functionbase.h @@ -17,6 +17,7 @@ #include "core/request.h" #include "core/config.h" #include "core/system.h" +#include "core/synchro.h" #include "notify/notify.h" #include "utf8.h" @@ -52,6 +53,7 @@ public: void SetSystem(System * psystem); void SetFunctions(Functions * pfunctions); void SetTemplates(Templates * ptemplates); + void SetSynchro(Synchro * psynchro); protected: @@ -61,6 +63,7 @@ protected: System * system; Functions * functions; Templates * templates; + Synchro * synchro; }; diff --git a/functions/functions.cpp b/functions/functions.cpp index dcd99f3..6f64264 100755 --- a/functions/functions.cpp +++ b/functions/functions.cpp @@ -45,6 +45,12 @@ void Functions::SetTemplates(Templates * ptemplates) } +void Functions::SetSynchro(Synchro * psynchro) +{ + synchro = psynchro; +} + + size_t Functions::FunctionsSize() @@ -134,6 +140,7 @@ void Functions::SetObjects(FunctionBase * fun) fun->SetSystem(system); fun->SetFunctions(this); fun->SetTemplates(templates); + fun->SetSynchro(synchro); } diff --git a/functions/functions.h b/functions/functions.h index 0e030f2..a2b23be 100755 --- a/functions/functions.h +++ b/functions/functions.h @@ -105,6 +105,7 @@ public: void SetDb(Db * pdb); void SetSystem(System * psystem); void SetTemplates(Templates * ptemplates); + void SetSynchro(Synchro * psynchro); FunctionBase * Find(const std::wstring & function_name); Error CheckSpecialFile(const Item & item); @@ -137,6 +138,7 @@ private: Request * request; Db * db; System * system; + Synchro * synchro; Templates * templates; std::wstring temp; diff --git a/locale/en b/locale/en index e4d55ef..408d9ea 100755 --- a/locale/en +++ b/locale/en @@ -252,7 +252,6 @@ notify_msg1 = We would like to inform you that notify_msg2 = someone created a new thread: notify_msg2b = someone created a new ticket: notify_msg3 = someone replayed in a thread: -notify_msg3b = someone replayed in a ticket: notify_msg4 = someone has changed its post: notify_msg5 = a post has been deleted from a thread: notify_msg6 = a new page has been added: diff --git a/locale/pl b/locale/pl index e4e95c4..27c3ef1 100755 --- a/locale/pl +++ b/locale/pl @@ -259,7 +259,6 @@ notify_msg1 = Chcielibyśmy powiadomić że właśnie notify_msg2 = ktoś rozpoczął nowy wątek: notify_msg2b = ktoś rozpoczął nowy ticket: notify_msg3 = ktoś odpowiedział w wątku: -notify_msg3b = ktoś odpowiedział w tickecie: notify_msg4 = ktoś zmienił swoją odpowiedź w wątku: notify_msg5 = czyjaś odpowiedź została skasowana z wątku: notify_msg6 = pojawiła się nowa pozycja do poczytania: diff --git a/main/Makefile.dep b/main/Makefile.dep index 23f3ff5..7ddd992 100755 --- a/main/Makefile.dep +++ b/main/Makefile.dep @@ -24,19 +24,19 @@ main.o: ../core/mountparser.h ../core/users.h ../core/groups.h main.o: ../core/group.h ../core/loadavg.h ../core/sessionmanager.h main.o: ../core/sessioncontainer.h ../functions/functions.h main.o: ../functions/functionbase.h ../core/request.h ../core/system.h -main.o: ../functions/functionparser.h ../functions/adduser.h -main.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -main.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h -main.o: ../functions/createthread.h ../functions/default.h -main.o: ../functions/download.h ../functions/emacs.h ../functions/last.h -main.o: ../functions/login.h ../functions/logout.h ../functions/ls.h -main.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h -main.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h -main.o: ../functions/run.h ../functions/stat.h ../functions/subject.h -main.o: ../functions/funthread.h ../functions/template.h -main.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h -main.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h -main.o: ../core/htmlfilter.h ../templates/templates.h +main.o: ../core/synchro.h ../functions/functionparser.h +main.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +main.o: ../functions/privchanger.h ../functions/chown.h +main.o: ../functions/ckeditor.h ../functions/cp.h ../functions/createthread.h +main.o: ../functions/default.h ../functions/download.h ../functions/emacs.h +main.o: ../functions/last.h ../functions/login.h ../functions/logout.h +main.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h +main.o: ../functions/node.h ../functions/priv.h ../functions/reload.h +main.o: ../functions/rm.h ../functions/run.h ../functions/stat.h +main.o: ../functions/subject.h ../functions/funthread.h +main.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h +main.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h +main.o: ../functions/vim.h ../core/htmlfilter.h ../templates/templates.h main.o: ../templates/patterncacher.h ../templates/ckeditorgetparser.h main.o: ../core/httpsimpleparser.h ../core/log.h ../templates/indexpatterns.h main.o: ../core/sessionmanager.h ../core/compress.h ../core/getparser.h diff --git a/notify/Makefile.dep b/notify/Makefile.dep index fb8f950..9ae4696 100755 --- a/notify/Makefile.dep +++ b/notify/Makefile.dep @@ -26,7 +26,22 @@ notify.o: ../core/dirs.h ../core/dircontainer.h ../notify/notify.h notify.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h notify.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h notify.o: ../core/sessionmanager.h ../core/sessioncontainer.h -notify.o: ../core/system.h ../core/dirs.h ../core/synchro.h +notify.o: ../core/system.h ../core/dirs.h ../core/synchro.h ../core/plugin.h +notify.o: ../core/pluginmsg.h ../core/sessionmanager.h +notify.o: ../functions/functions.h ../functions/functionbase.h +notify.o: ../functions/functionparser.h ../functions/adduser.h +notify.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h +notify.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +notify.o: ../functions/createthread.h ../functions/default.h +notify.o: ../functions/download.h ../functions/emacs.h ../functions/last.h +notify.o: ../functions/login.h ../functions/logout.h ../functions/ls.h +notify.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h +notify.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h +notify.o: ../functions/run.h ../functions/stat.h ../functions/subject.h +notify.o: ../functions/funthread.h ../functions/template.h +notify.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +notify.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h +notify.o: ../core/htmlfilter.h notifypool.o: notifypool.h ../templates/locale.h ../core/confparser.h notifythread.o: notifythread.h ../core/basethread.h ../core/synchro.h notifythread.o: templatesnotify.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h @@ -54,3 +69,43 @@ templatesnotify.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h templatesnotify.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h templatesnotify.o: ../core/textstream.h ../core/misc.h notifypool.h templatesnotify.o: ../templates/locale.h ../core/confparser.h +templatesnotify.o: ../core/plugin.h ../core/pluginmsg.h ../core/log.h +templatesnotify.o: ../core/textstream.h ../core/plugindata.h ../core/config.h +templatesnotify.o: ../core/request.h ../core/requesttypes.h ../core/session.h +templatesnotify.o: ../core/error.h ../core/user.h ../core/rebus.h +templatesnotify.o: ../templates/htmltextstream.h ../core/system.h +templatesnotify.o: ../core/sessionmanager.h ../core/synchro.h +templatesnotify.o: ../functions/functions.h ../functions/functionbase.h +templatesnotify.o: ../core/item.h ../db/db.h ../db/dbbase.h ../db/dbconn.h +templatesnotify.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h +templatesnotify.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h +templatesnotify.o: ../core/thread.h ../core/dircontainer.h +templatesnotify.o: ../core/ugcontainer.h ../core/request.h ../core/config.h +templatesnotify.o: ../core/confparser.h ../core/htmlfilter.h ../core/system.h +templatesnotify.o: ../core/dirs.h ../core/dircontainer.h ../notify/notify.h +templatesnotify.o: ../core/mounts.h ../core/mount.h ../core/mountparser.h +templatesnotify.o: ../core/users.h ../core/groups.h ../core/group.h +templatesnotify.o: ../core/ugcontainer.h ../core/loadavg.h ../core/synchro.h +templatesnotify.o: ../functions/functionparser.h ../functions/adduser.h +templatesnotify.o: ../functions/cat.h ../functions/chmod.h +templatesnotify.o: ../functions/privchanger.h ../functions/chown.h +templatesnotify.o: ../functions/ckeditor.h ../functions/cp.h +templatesnotify.o: ../functions/createthread.h ../functions/default.h +templatesnotify.o: ../functions/download.h ../functions/emacs.h +templatesnotify.o: ../functions/last.h ../functions/login.h +templatesnotify.o: ../functions/logout.h ../functions/ls.h +templatesnotify.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h +templatesnotify.o: ../functions/priv.h ../functions/reload.h +templatesnotify.o: ../functions/rm.h ../functions/run.h ../functions/stat.h +templatesnotify.o: ../functions/subject.h ../functions/funthread.h +templatesnotify.o: ../functions/template.h ../functions/tinymce.h +templatesnotify.o: ../functions/uname.h ../functions/upload.h +templatesnotify.o: ../functions/uptime.h ../functions/who.h +templatesnotify.o: ../functions/vim.h ../core/htmlfilter.h +templatesnotify.o: ../templates/templates.h ../templates/patterncacher.h +templatesnotify.o: ../templates/ckeditorgetparser.h +templatesnotify.o: ../core/httpsimpleparser.h ../core/log.h +templatesnotify.o: ../templates/indexpatterns.h ../templates/localefilter.h +templatesnotify.o: ../templates/locale.h ../templates/htmltextstream.h +templatesnotify.o: ../core/sessionmanager.h ../core/sessioncontainer.h +templatesnotify.o: ../core/lastcontainer.h diff --git a/notify/notify.cpp b/notify/notify.cpp index 6d81f8a..c37a481 100755 --- a/notify/notify.cpp +++ b/notify/notify.cpp @@ -14,6 +14,7 @@ #include "core/users.h" #include "core/dirs.h" #include "core/synchro.h" +#include "core/plugin.h" @@ -67,6 +68,8 @@ void Notify::Init() notify_template_cms = AddTemplate(L"notify_email_cms.txt"); // !! do konfiga notify_template_thread = AddTemplate(L"notify_email_thread.txt"); + + plugin.Call(WINIX_NOTIFY_ADD_TEMPLATE); } @@ -121,8 +124,16 @@ void Notify::ItemChanged(int notify_code, const Item & item) return; } + ItemChanged(msg); +} + + + +// raw form +void Notify::ItemChanged(const NotifyMsg & msg) +{ notify_pool.Add(msg); - SendSignalToThread(); //we are in the first locked thread + SendSignalToThread(); // we are in the first locked thread } diff --git a/notify/notify.h b/notify/notify.h index d1e170e..1eabca6 100755 --- a/notify/notify.h +++ b/notify/notify.h @@ -46,6 +46,7 @@ public: void ReadTemplates(); void ItemChanged(int notify_code, const Item & item); + void ItemChanged(const NotifyMsg & msg); private: diff --git a/notify/notifypool.h b/notify/notifypool.h index bbdb82c..5df8234 100755 --- a/notify/notifypool.h +++ b/notify/notifypool.h @@ -38,6 +38,20 @@ +// additional codes, use it of your own +// you should prepare NotifyMsg structure and use it with ItemChanged method of notify object +// remember that from this code an appropirate user is selected (db->core->user notify value) +// and ezc templates may behave differently +#define WINIX_NOTIFY_CODE_USER1 1024 +#define WINIX_NOTIFY_CODE_USER2 2048 +#define WINIX_NOTIFY_CODE_USER3 4096 +#define WINIX_NOTIFY_CODE_USER4 8192 +#define WINIX_NOTIFY_CODE_USER5 16384 +#define WINIX_NOTIFY_CODE_USER6 32768 +#define WINIX_NOTIFY_CODE_USER7 65536 +#define WINIX_NOTIFY_CODE_USER8 131072 + + struct NotifyMsg { diff --git a/notify/notifythread.cpp b/notify/notifythread.cpp index 1583705..748531a 100755 --- a/notify/notifythread.cpp +++ b/notify/notifythread.cpp @@ -69,8 +69,6 @@ bool NotifyThread::SignalReceived() { if( patterns_changed ) { - // !! usunac - log << log3 << "NotifyThread: copying global patterns to local ones" << logend; patterns = *pat_global; patterns_changed = false; } @@ -98,7 +96,7 @@ bool res = false; for(i=users->Begin() ; i != users->End() ; ++i) { - if( (i->cms_notify & TemplatesNotifyFunctions::notify_msg.code) != 0 ) // !! bedzie jedno pole i->notify + if( (i->notify & TemplatesNotifyFunctions::notify_msg.code) != 0 ) { msg.name = i->name; msg.email = i->email; @@ -168,10 +166,14 @@ void NotifyThread::SendMail() size_t lang_index = static_cast(TemplatesNotifyFunctions::notify_user_msg.lang); size_t template_index = TemplatesNotifyFunctions::notify_msg.template_index; - if( lang_index >= patterns.size() || - template_index >= patterns[lang_index].size() ) + if( lang_index >= patterns.size() ) + return; + + if( template_index >= patterns[lang_index].size() ) { - // ops, something wrong + Lock(); + log << log1 << "NotifyThread: incorrect template index: " << template_index << logend; + Unlock(); return; } diff --git a/notify/templatesnotify.cpp b/notify/templatesnotify.cpp index 255be6b..88ab85a 100755 --- a/notify/templatesnotify.cpp +++ b/notify/templatesnotify.cpp @@ -8,7 +8,7 @@ */ #include "templatesnotify.h" - +#include "core/plugin.h" @@ -115,6 +115,8 @@ void CreateFunctions() //ezc_functions.Insert("notify_doc_base_url", notify_doc_base_url); ezc_functions.Insert("notify_item_link", notify_item_link); ezc_functions.Insert("notify_dir_link", notify_dir_link); + + plugin.Call(WINIX_NOTIFY_TEMPLATES_CREATEFUNCTIONS, &ezc_functions); } diff --git a/plugins/stats/Makefile.dep b/plugins/stats/Makefile.dep index 9abdfd9..dc77369 100755 --- a/plugins/stats/Makefile.dep +++ b/plugins/stats/Makefile.dep @@ -30,25 +30,26 @@ init.o: ../../core/users.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: ../../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/patterncacher.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 +init.o: ../../core/synchro.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 ../../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 ../../core/textstream.h stats.o: ../../core/misc.h ../../core/item.h ../../../ezc/src/utf8.h templates.o: templates.h ../../core/plugin.h ../../core/pluginmsg.h @@ -81,25 +82,25 @@ templates.o: ../../core/session.h ../../functions/functions.h templates.o: ../../functions/functionbase.h ../../core/request.h templates.o: ../../core/requesttypes.h ../../core/textstream.h templates.o: ../../core/misc.h ../../templates/htmltextstream.h -templates.o: ../../core/system.h ../../functions/functionparser.h -templates.o: ../../functions/adduser.h ../../functions/cat.h -templates.o: ../../functions/chmod.h ../../functions/privchanger.h -templates.o: ../../functions/chown.h ../../functions/ckeditor.h -templates.o: ../../functions/cp.h ../../functions/createthread.h -templates.o: ../../functions/default.h ../../functions/download.h -templates.o: ../../functions/emacs.h ../../functions/last.h -templates.o: ../../functions/login.h ../../functions/logout.h -templates.o: ../../functions/ls.h ../../functions/mkdir.h -templates.o: ../../functions/mv.h ../../functions/node.h -templates.o: ../../functions/priv.h ../../functions/reload.h -templates.o: ../../functions/rm.h ../../functions/run.h -templates.o: ../../functions/stat.h ../../functions/subject.h -templates.o: ../../functions/funthread.h ../../functions/template.h -templates.o: ../../functions/tinymce.h ../../functions/uname.h -templates.o: ../../functions/upload.h ../../functions/uptime.h -templates.o: ../../functions/who.h ../../functions/vim.h -templates.o: ../../core/htmlfilter.h ../../templates/templates.h -templates.o: ../../templates/patterncacher.h +templates.o: ../../core/system.h ../../core/synchro.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 +templates.o: ../../functions/ckeditor.h ../../functions/cp.h +templates.o: ../../functions/createthread.h ../../functions/default.h +templates.o: ../../functions/download.h ../../functions/emacs.h +templates.o: ../../functions/last.h ../../functions/login.h +templates.o: ../../functions/logout.h ../../functions/ls.h +templates.o: ../../functions/mkdir.h ../../functions/mv.h +templates.o: ../../functions/node.h ../../functions/priv.h +templates.o: ../../functions/reload.h ../../functions/rm.h +templates.o: ../../functions/run.h ../../functions/stat.h +templates.o: ../../functions/subject.h ../../functions/funthread.h +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/patterncacher.h templates.o: ../../templates/ckeditorgetparser.h templates.o: ../../core/httpsimpleparser.h ../../core/log.h templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h diff --git a/plugins/ticket/Makefile.dep b/plugins/ticket/Makefile.dep index 596e262..c1d4feb 100755 --- a/plugins/ticket/Makefile.dep +++ b/plugins/ticket/Makefile.dep @@ -30,7 +30,7 @@ createticket.o: ../../core/ugcontainer.h ../../core/lastcontainer.h createticket.o: ../../core/mounts.h ../../core/mount.h createticket.o: ../../core/mountparser.h ../../core/users.h createticket.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h -createticket.o: ticketinfo.h ticketparser.h ticketconf.h +createticket.o: ../../core/synchro.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 @@ -78,24 +78,25 @@ editticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h editticket.o: ../../functions/functionbase.h ../../core/request.h editticket.o: ../../core/requesttypes.h ../../core/session.h editticket.o: ../../core/plugindata.h ../../templates/htmltextstream.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 +editticket.o: ../../core/synchro.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 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/misc.h ../../core/item.h ../../core/error.h @@ -125,7 +126,7 @@ funticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h funticket.o: ../../functions/functionbase.h ../../core/request.h funticket.o: ../../core/requesttypes.h ../../core/session.h funticket.o: ../../core/plugindata.h ../../templates/htmltextstream.h -funticket.o: ../../core/misc.h +funticket.o: ../../core/synchro.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/misc.h init.o: ../../core/item.h ../../core/error.h ../../core/log.h @@ -152,9 +153,9 @@ init.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h init.o: ../../core/group.h ../../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 ../../templates/htmltextstream.h editticket.h -init.o: createticket.h ../../core/log.h ../../core/plugin.h -init.o: ../../core/pluginmsg.h ../../core/system.h +init.o: ../../core/plugindata.h ../../templates/htmltextstream.h +init.o: ../../core/synchro.h editticket.h createticket.h ../../core/log.h +init.o: ../../core/plugin.h ../../core/pluginmsg.h ../../core/system.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 @@ -208,29 +209,29 @@ templates.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h templates.o: ../../core/error.h editticket.h ../../functions/functionbase.h templates.o: ../../core/request.h ../../core/requesttypes.h templates.o: ../../core/session.h ../../core/plugindata.h -templates.o: ../../templates/htmltextstream.h createticket.h -templates.o: ../../core/misc.h ../../core/plugin.h ../../core/pluginmsg.h -templates.o: ../../core/system.h ../../core/sessionmanager.h -templates.o: ../../core/sessioncontainer.h ../../functions/functions.h -templates.o: ../../functions/functionbase.h ../../functions/functionparser.h -templates.o: ../../functions/adduser.h ../../functions/cat.h -templates.o: ../../functions/chmod.h ../../functions/privchanger.h -templates.o: ../../functions/chown.h ../../functions/ckeditor.h -templates.o: ../../functions/cp.h ../../functions/createthread.h -templates.o: ../../functions/default.h ../../functions/download.h -templates.o: ../../functions/emacs.h ../../functions/last.h -templates.o: ../../functions/login.h ../../functions/logout.h -templates.o: ../../functions/ls.h ../../functions/mkdir.h -templates.o: ../../functions/mv.h ../../functions/node.h -templates.o: ../../functions/priv.h ../../functions/reload.h -templates.o: ../../functions/rm.h ../../functions/run.h -templates.o: ../../functions/stat.h ../../functions/subject.h -templates.o: ../../functions/funthread.h ../../functions/template.h -templates.o: ../../functions/tinymce.h ../../functions/uname.h -templates.o: ../../functions/upload.h ../../functions/uptime.h -templates.o: ../../functions/who.h ../../functions/vim.h -templates.o: ../../core/htmlfilter.h ../../templates/templates.h -templates.o: ../../templates/patterncacher.h +templates.o: ../../templates/htmltextstream.h ../../core/synchro.h +templates.o: createticket.h ../../core/misc.h ../../core/plugin.h +templates.o: ../../core/pluginmsg.h ../../core/system.h +templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h +templates.o: ../../functions/functions.h ../../functions/functionbase.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 +templates.o: ../../functions/ckeditor.h ../../functions/cp.h +templates.o: ../../functions/createthread.h ../../functions/default.h +templates.o: ../../functions/download.h ../../functions/emacs.h +templates.o: ../../functions/last.h ../../functions/login.h +templates.o: ../../functions/logout.h ../../functions/ls.h +templates.o: ../../functions/mkdir.h ../../functions/mv.h +templates.o: ../../functions/node.h ../../functions/priv.h +templates.o: ../../functions/reload.h ../../functions/rm.h +templates.o: ../../functions/run.h ../../functions/stat.h +templates.o: ../../functions/subject.h ../../functions/funthread.h +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/patterncacher.h templates.o: ../../templates/ckeditorgetparser.h templates.o: ../../core/httpsimpleparser.h ../../core/log.h templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h diff --git a/plugins/ticket/createticket.cpp b/plugins/ticket/createticket.cpp index c0b0f21..87b3b3c 100755 --- a/plugins/ticket/createticket.cpp +++ b/plugins/ticket/createticket.cpp @@ -15,6 +15,7 @@ namespace Ticket { + CreateTicket::CreateTicket() { fun.url = L"createticket"; @@ -83,8 +84,19 @@ bool CreateTicket::HasAccess() void CreateTicket::AddTicket() { // a new directory created by system->AddDir() - ticket_info->ticket.dir_id = request->dir_tab.back()->id; + ticket_info->ticket.dir_id = request->dir_tab.back()->id; request->status = tdb->AddTicket(ticket_info->ticket); + + // sending notification + notify_msg.code = WINIX_NOTIFY_CODE_USER1; + notify_msg.template_index = ticket_info->template_index; + + system->dirs.MakePath(ticket_info->item.parent_id, tmp_path); + notify_msg.item_link = config->base_url; + notify_msg.item_link += tmp_path; + notify_msg.dir_link = notify_msg.item_link; + + system->notify.ItemChanged(notify_msg); } diff --git a/plugins/ticket/createticket.h b/plugins/ticket/createticket.h index 12e80a4..156d949 100755 --- a/plugins/ticket/createticket.h +++ b/plugins/ticket/createticket.h @@ -13,6 +13,7 @@ #include "tdb.h" #include "functions/functionbase.h" #include "ticketinfo.h" +#include "notify/notify.h" namespace Ticket @@ -40,6 +41,8 @@ private: TDb * tdb; TicketInfo * ticket_info; + NotifyMsg notify_msg; + std::wstring tmp_path; }; diff --git a/plugins/ticket/init.cpp b/plugins/ticket/init.cpp index b2d1197..4d85d34 100755 --- a/plugins/ticket/init.cpp +++ b/plugins/ticket/init.cpp @@ -101,6 +101,13 @@ void InitTicket(PluginInfo & info) ticket_info.progress_prefix = info.config->Text(L"ticket_form_progress_prefix", L"progress"); } + +void AddNotifyTemplate(PluginInfo & info) +{ + ticket_info.template_index = info.system->notify.AddTemplate(L"notify_email_ticket.txt"); +} + + void AddEzcFunctions(PluginInfo & info); } // namespace Ticket @@ -119,6 +126,7 @@ using namespace Ticket; plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged); plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest); plugin.Assign(WINIX_DIR_REMOVED, RemoveTicket); + plugin.Assign(WINIX_NOTIFY_ADD_TEMPLATE, AddNotifyTemplate); tdb.SetConn(info.db->GetConn()); tdb.LogQueries(info.config->log_db_query); @@ -137,7 +145,7 @@ using namespace Ticket; fun_create_ticket.SetTDb(&tdb); fun_create_ticket.SetTicketInfo(&ticket_info); - info.p1 = (void*)plugin_name; + info.p1 = (void*)(plugin_name); } diff --git a/plugins/ticket/ticketinfo.h b/plugins/ticket/ticketinfo.h index 67de545..da5852c 100755 --- a/plugins/ticket/ticketinfo.h +++ b/plugins/ticket/ticketinfo.h @@ -89,6 +89,10 @@ public: int mount_par_createticket_on; + // template index for notifications + size_t template_index; + + void ReadTicketConf(bool skip_existing_configs = false); void FindCurrentConf(); bool CheckMinMaxValue(const TicketConf::TicketItem & ticket_item, Ticket::TicketParam & par); diff --git a/templates/Makefile.dep b/templates/Makefile.dep index 35e28e9..a64a03a 100755 --- a/templates/Makefile.dep +++ b/templates/Makefile.dep @@ -47,19 +47,20 @@ dir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h dir.o: ../core/mountparser.h ../core/users.h ../core/groups.h ../core/group.h dir.o: ../core/loadavg.h ../core/sessionmanager.h ../core/sessioncontainer.h dir.o: ../core/system.h ../core/misc.h ../functions/functions.h -dir.o: ../functions/functionbase.h ../functions/functionparser.h -dir.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h -dir.o: ../functions/privchanger.h ../functions/chown.h -dir.o: ../functions/ckeditor.h ../functions/cp.h ../functions/createthread.h -dir.o: ../functions/default.h ../functions/download.h ../functions/emacs.h -dir.o: ../functions/last.h ../functions/login.h ../functions/logout.h -dir.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h -dir.o: ../functions/node.h ../functions/priv.h ../functions/reload.h -dir.o: ../functions/rm.h ../functions/run.h ../functions/stat.h -dir.o: ../functions/subject.h ../functions/funthread.h -dir.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h -dir.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h -dir.o: ../functions/vim.h ../core/htmlfilter.h +dir.o: ../functions/functionbase.h ../core/synchro.h +dir.o: ../functions/functionparser.h ../functions/adduser.h +dir.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h +dir.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +dir.o: ../functions/createthread.h ../functions/default.h +dir.o: ../functions/download.h ../functions/emacs.h ../functions/last.h +dir.o: ../functions/login.h ../functions/logout.h ../functions/ls.h +dir.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h +dir.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h +dir.o: ../functions/run.h ../functions/stat.h ../functions/subject.h +dir.o: ../functions/funthread.h ../functions/template.h +dir.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h +dir.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h +dir.o: ../core/htmlfilter.h doc.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h doc.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h ../../ezc/src/item.h doc.o: ../../ezc/src/funinfo.h ../../ezc/src/functions.h @@ -255,19 +256,19 @@ priv.o: ../core/mount.h ../core/mountparser.h ../core/users.h priv.o: ../core/groups.h ../core/group.h ../core/loadavg.h priv.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h priv.o: ../core/misc.h ../functions/functions.h ../functions/functionbase.h -priv.o: ../functions/functionparser.h ../functions/adduser.h -priv.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -priv.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h -priv.o: ../functions/createthread.h ../functions/default.h -priv.o: ../functions/download.h ../functions/emacs.h ../functions/last.h -priv.o: ../functions/login.h ../functions/logout.h ../functions/ls.h -priv.o: ../functions/mkdir.h ../functions/mv.h ../functions/node.h -priv.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h -priv.o: ../functions/run.h ../functions/stat.h ../functions/subject.h -priv.o: ../functions/funthread.h ../functions/template.h -priv.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h -priv.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h -priv.o: ../core/htmlfilter.h +priv.o: ../core/synchro.h ../functions/functionparser.h +priv.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +priv.o: ../functions/privchanger.h ../functions/chown.h +priv.o: ../functions/ckeditor.h ../functions/cp.h ../functions/createthread.h +priv.o: ../functions/default.h ../functions/download.h ../functions/emacs.h +priv.o: ../functions/last.h ../functions/login.h ../functions/logout.h +priv.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h +priv.o: ../functions/node.h ../functions/priv.h ../functions/reload.h +priv.o: ../functions/rm.h ../functions/run.h ../functions/stat.h +priv.o: ../functions/subject.h ../functions/funthread.h +priv.o: ../functions/template.h ../functions/tinymce.h ../functions/uname.h +priv.o: ../functions/upload.h ../functions/uptime.h ../functions/who.h +priv.o: ../functions/vim.h ../core/htmlfilter.h rebus.o: ../core/request.h templates.h ../../ezc/src/ezc.h rebus.o: ../../ezc/src/utf8.h ../../ezc/src/generator.h rebus.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h @@ -391,8 +392,8 @@ templates.o: ../core/sessionmanager.h ../core/sessioncontainer.h templates.o: ../core/system.h ../core/misc.h ../core/plugin.h templates.o: ../core/pluginmsg.h ../core/sessionmanager.h templates.o: ../functions/functions.h ../functions/functionbase.h -templates.o: ../functions/functionparser.h ../functions/adduser.h -templates.o: ../functions/cat.h ../functions/chmod.h +templates.o: ../core/synchro.h ../functions/functionparser.h +templates.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h templates.o: ../functions/privchanger.h ../functions/chown.h templates.o: ../functions/ckeditor.h ../functions/cp.h templates.o: ../functions/createthread.h ../functions/default.h @@ -429,10 +430,10 @@ thread.o: ../core/mount.h ../core/mountparser.h ../core/users.h thread.o: ../core/groups.h ../core/group.h ../core/loadavg.h thread.o: ../core/sessionmanager.h ../core/sessioncontainer.h thread.o: ../core/system.h ../core/misc.h ../functions/functions.h -thread.o: ../functions/functionbase.h ../functions/functionparser.h -thread.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h -thread.o: ../functions/privchanger.h ../functions/chown.h -thread.o: ../functions/ckeditor.h ../functions/cp.h +thread.o: ../functions/functionbase.h ../core/synchro.h +thread.o: ../functions/functionparser.h ../functions/adduser.h +thread.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h +thread.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h thread.o: ../functions/createthread.h ../functions/default.h thread.o: ../functions/download.h ../functions/emacs.h ../functions/last.h thread.o: ../functions/login.h ../functions/logout.h ../functions/ls.h @@ -563,9 +564,10 @@ winix.o: ../core/groups.h ../core/group.h ../core/loadavg.h winix.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h winix.o: ../core/plugin.h ../core/pluginmsg.h ../core/sessionmanager.h winix.o: ../functions/functions.h ../functions/functionbase.h -winix.o: ../functions/functionparser.h ../functions/adduser.h -winix.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h -winix.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h +winix.o: ../core/synchro.h ../functions/functionparser.h +winix.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h +winix.o: ../functions/privchanger.h ../functions/chown.h +winix.o: ../functions/ckeditor.h ../functions/cp.h winix.o: ../functions/createthread.h ../functions/default.h winix.o: ../functions/download.h ../functions/emacs.h ../functions/last.h winix.o: ../functions/login.h ../functions/logout.h ../functions/ls.h diff --git a/txt/notify_email_ticket.txt b/txt/notify_email_ticket.txt index c9e48a7..ceddc1d 100755 --- a/txt/notify_email_ticket.txt +++ b/txt/notify_email_ticket.txt @@ -1,4 +1,4 @@ -Subject: [if notify_file_added]{notify_new}[else]{notify_change}[end]\n +Subject: {notify_new}\n From: {notify_from}\n To: [notify_to]\n Content-Type: {notify_content_type} @@ -8,25 +8,8 @@ Content-Type: {notify_content_type} {notify_msg1}\s -[if notify_dir_added] - {notify_msg2b}\n - [notify_item_link]\n\n -[end] - -[if notify_file_added] - {notify_msg3b}\n - [notify_item_link]\n\n -[end] - -[if notify_file_edited] - {notify_msg4}\n - [notify_item_link]\n\n -[end] - -[if notify_file_deleted] - {notify_msg5}\n - [notify_item_link]\n\n -[end] +{notify_msg2b}\n +[notify_item_link]\n\n {notify_msg9}\n