'tickets' can use 'threads' now
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@706 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -127,7 +127,7 @@ void SessionCreated(PluginInfo & info)
|
||||
|
||||
if( !info.request->IsParam(nostat_param) )
|
||||
{
|
||||
log << log3 << "created stats plugin data"
|
||||
log << log4 << "Stats: created stats plugin data"
|
||||
<< ", plugin id: " << info.plugin_id
|
||||
<< ", pointer: " << d << logend;
|
||||
}
|
||||
@@ -146,16 +146,14 @@ void RemoveSession(PluginInfo & info)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//StatsSession * d = reinterpret_cast<StatsSession*>(info.plugin_data_base);
|
||||
StatsSession * d = reinterpret_cast<StatsSession*>(info.plugin_data_base);
|
||||
|
||||
if( !d->nostat )
|
||||
{
|
||||
log << log3 << "deleting stats plugin data"
|
||||
log << log4 << "Stats: deleting stats plugin data"
|
||||
<< ", plugin id: " << info.plugin_id
|
||||
<< ", pointer: " << info.plugin_data_base << logend;
|
||||
}
|
||||
*/
|
||||
|
||||
delete info.plugin_data_base;
|
||||
}
|
||||
|
@@ -1,374 +1,294 @@
|
||||
# DO NOT DELETE
|
||||
|
||||
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/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/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: ../../templates/htmltextstream.h ../../core/config.h
|
||||
createticket.o: ../../core/system.h ../../core/dirs.h
|
||||
createticket.o: ../../core/dircontainer.h ../../core/request.h
|
||||
createticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
createticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
createticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
createticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
createticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
createticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
createticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
createticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
createticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
createticket.o: ../../notify/templatesnotify.h ../../core/users.h
|
||||
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: ../../core/thumb.h ../../core/basethread.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
|
||||
createticket.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
createticket.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
createticket.o: ../../functions/createthread.h ../../functions/default.h
|
||||
createticket.o: ../../functions/download.h ../../functions/emacs.h
|
||||
createticket.o: ../../functions/last.h ../../functions/login.h
|
||||
createticket.o: ../../functions/logout.h ../../functions/ln.h
|
||||
createticket.o: ../../functions/ls.h ../../functions/mkdir.h
|
||||
createticket.o: ../../functions/mv.h ../../functions/node.h
|
||||
createticket.o: ../../functions/priv.h ../../functions/reload.h
|
||||
createticket.o: ../../functions/rm.h ../../functions/run.h
|
||||
createticket.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
createticket.o: ../../functions/subject.h ../../functions/funthread.h
|
||||
createticket.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
createticket.o: ../../functions/uname.h ../../functions/upload.h
|
||||
createticket.o: ../../functions/uptime.h ../../functions/who.h
|
||||
createticket.o: ../../functions/vim.h ../../core/htmlfilter.h sessiondata.h
|
||||
createticket.o: ../../core/plugindata.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/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
|
||||
editticket.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
editticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
editticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
editticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
editticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
editticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
editticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
editticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
editticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
editticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
editticket.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
editticket.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
editticket.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
editticket.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
editticket.o: ../../core/config.h ../../core/confparser.h
|
||||
editticket.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
editticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
editticket.o: ../../core/thumb.h ../../core/basethread.h
|
||||
editticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
editticket.o: ../../functions/functionparser.h ../../core/request.h
|
||||
editticket.o: ../../core/requesttypes.h ../../core/session.h
|
||||
editticket.o: ../../core/plugindata.h ../../templates/htmltextstream.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/ln.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/specialdefault.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 ../../functions/functionbase.h
|
||||
editticket.o: ../../core/synchro.h sessiondata.h ../../core/plugindata.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
|
||||
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
|
||||
funticket.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
funticket.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
funticket.o: ../../templates/locale.h ../../core/confparser.h
|
||||
funticket.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
funticket.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
funticket.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
funticket.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
funticket.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
funticket.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
funticket.o: ../../core/basethread.h ../../core/synchro.h
|
||||
funticket.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
funticket.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
funticket.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
funticket.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
funticket.o: ../../core/config.h ../../core/confparser.h
|
||||
funticket.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
funticket.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
funticket.o: ../../core/thumb.h ../../core/basethread.h
|
||||
funticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
funticket.o: ../../functions/functionparser.h ../../core/request.h
|
||||
funticket.o: ../../core/requesttypes.h ../../core/session.h
|
||||
funticket.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
funticket.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
funticket.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
funticket.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
funticket.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
funticket.o: ../../functions/default.h ../../functions/download.h
|
||||
funticket.o: ../../functions/emacs.h ../../functions/last.h
|
||||
funticket.o: ../../functions/login.h ../../functions/logout.h
|
||||
funticket.o: ../../functions/ln.h ../../functions/ls.h
|
||||
funticket.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
funticket.o: ../../functions/node.h ../../functions/priv.h
|
||||
funticket.o: ../../functions/reload.h ../../functions/rm.h
|
||||
funticket.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
funticket.o: ../../functions/stat.h ../../functions/subject.h
|
||||
funticket.o: ../../functions/funthread.h ../../functions/template.h
|
||||
funticket.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
funticket.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
funticket.o: ../../functions/who.h ../../functions/vim.h
|
||||
funticket.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
funticket.o: ../../core/synchro.h
|
||||
init.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
createthread.o: createthread.h ../../functions/functionbase.h
|
||||
createthread.o: ../../core/item.h ../../db/db.h ../../db/dbbase.h
|
||||
createthread.o: ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
createthread.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
|
||||
createthread.o: ../../core/error.h ../../core/log.h ../../core/textstream.h
|
||||
createthread.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
createthread.o: ../../core/user.h ../../core/group.h
|
||||
createthread.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
createthread.o: ../../core/request.h ../../core/requesttypes.h
|
||||
createthread.o: ../../core/session.h ../../core/error.h ../../core/user.h
|
||||
createthread.o: ../../core/plugindata.h ../../core/rebus.h
|
||||
createthread.o: ../../core/config.h ../../core/confparser.h
|
||||
createthread.o: ../../core/htmlfilter.h ../../templates/htmltextstream.h
|
||||
createthread.o: ../../core/config.h ../../core/system.h ../../core/dirs.h
|
||||
createthread.o: ../../core/dircontainer.h ../../core/request.h
|
||||
createthread.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
createthread.o: ../../templates/locale.h ../../core/confparser.h
|
||||
createthread.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
createthread.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
createthread.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
createthread.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
createthread.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
createthread.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
createthread.o: ../../core/basethread.h ../../core/synchro.h
|
||||
createthread.o: ../../notify/templatesnotify.h ../../core/users.h
|
||||
createthread.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
createthread.o: ../../core/mounts.h ../../core/mount.h
|
||||
createthread.o: ../../core/mountparser.h ../../core/users.h
|
||||
createthread.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
createthread.o: ../../core/thumb.h ../../core/basethread.h
|
||||
createthread.o: ../../core/synchro.h tdb.h thread.h ../../db/dbbase.h
|
||||
createthread.o: threadinfo.h ../../functions/functions.h
|
||||
createthread.o: ../../functions/functionbase.h
|
||||
createthread.o: ../../functions/functionparser.h ../../functions/adduser.h
|
||||
createthread.o: ../../functions/cat.h ../../functions/chmod.h
|
||||
createthread.o: ../../functions/privchanger.h ../../functions/chown.h
|
||||
createthread.o: ../../functions/ckeditor.h ../../functions/cp.h
|
||||
createthread.o: ../../functions/default.h ../../functions/download.h
|
||||
createthread.o: ../../functions/emacs.h ../../functions/last.h
|
||||
createthread.o: ../../functions/login.h ../../functions/logout.h
|
||||
createthread.o: ../../functions/ln.h ../../functions/ls.h
|
||||
createthread.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
createthread.o: ../../functions/node.h ../../functions/priv.h
|
||||
createthread.o: ../../functions/reload.h ../../functions/rm.h
|
||||
createthread.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
createthread.o: ../../functions/stat.h ../../functions/subject.h
|
||||
createthread.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
createthread.o: ../../functions/uname.h ../../functions/upload.h
|
||||
createthread.o: ../../functions/uptime.h ../../functions/who.h
|
||||
createthread.o: ../../functions/vim.h ../../core/htmlfilter.h
|
||||
funthread.o: ../../core/misc.h ../../core/item.h funthread.h
|
||||
funthread.o: ../../functions/functionbase.h ../../core/item.h ../../db/db.h
|
||||
funthread.o: ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
funthread.o: ../../core/textstream.h ../../core/misc.h ../../core/error.h
|
||||
funthread.o: ../../core/log.h ../../core/textstream.h ../../db/dbitemquery.h
|
||||
funthread.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
funthread.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
funthread.o: ../../core/request.h ../../core/requesttypes.h
|
||||
funthread.o: ../../core/session.h ../../core/error.h ../../core/user.h
|
||||
funthread.o: ../../core/plugindata.h ../../core/rebus.h ../../core/config.h
|
||||
funthread.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
funthread.o: ../../templates/htmltextstream.h ../../core/config.h
|
||||
funthread.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
|
||||
funthread.o: ../../core/request.h ../../notify/notify.h
|
||||
funthread.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
funthread.o: ../../core/confparser.h ../../templates/misc.h
|
||||
funthread.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
funthread.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
funthread.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
funthread.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
funthread.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
funthread.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
funthread.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
funthread.o: ../../core/users.h ../../core/ugcontainer.h
|
||||
funthread.o: ../../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/thumb.h ../../core/basethread.h ../../core/synchro.h
|
||||
funthread.o: tdb.h thread.h ../../db/dbbase.h threadinfo.h
|
||||
init.o: tdb.h thread.h ../../db/dbbase.h ../../core/error.h ../../core/log.h
|
||||
init.o: ../../core/textstream.h reply.h ../../functions/functionbase.h
|
||||
init.o: ../../core/item.h ../../db/db.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
|
||||
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 ../../notify/notify.h
|
||||
init.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
init.o: ../../core/confparser.h ../../templates/misc.h
|
||||
init.o: ../../templates/localefilter.h ../../templates/locale.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/functions.h ../../../ezc/src/funinfo.h
|
||||
init.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
init.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
init.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
init.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
init.o: ../../core/item.h ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
init.o: ../../core/user.h ../../core/group.h ../../core/dircontainer.h
|
||||
init.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
init.o: ../../core/requesttypes.h ../../core/session.h ../../core/error.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: ../../templates/htmltextstream.h ../../core/config.h
|
||||
init.o: ../../core/system.h ../../core/dirs.h ../../core/dircontainer.h
|
||||
init.o: ../../core/request.h ../../notify/notify.h ../../notify/notifypool.h
|
||||
init.o: ../../templates/locale.h ../../core/confparser.h
|
||||
init.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
init.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
init.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
init.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
init.o: ../../core/basethread.h ../../core/synchro.h
|
||||
init.o: ../../notify/templatesnotify.h ../../core/users.h
|
||||
init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
init.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
|
||||
init.o: ../../core/mountparser.h ../../core/config.h ../../core/confparser.h
|
||||
init.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
init.o: ../../core/thumb.h ../../core/basethread.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
init.o: ../../functions/functionparser.h ../../core/request.h
|
||||
init.o: ../../core/requesttypes.h ../../core/session.h
|
||||
init.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
init.o: ../../core/mounts.h ../../core/mount.h ../../core/mountparser.h
|
||||
init.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
init.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
init.o: ../../core/synchro.h threadinfo.h funthread.h createthread.h
|
||||
init.o: showthreads.h ../../core/log.h ../../core/plugin.h pluginmsg.h
|
||||
init.o: ../../core/system.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/ln.h
|
||||
init.o: ../../functions/ls.h ../../functions/mkdir.h ../../functions/mv.h
|
||||
init.o: ../../functions/node.h ../../functions/priv.h
|
||||
init.o: ../../functions/reload.h ../../functions/rm.h ../../functions/run.h
|
||||
init.o: ../../functions/specialdefault.h ../../functions/stat.h
|
||||
init.o: ../../functions/subject.h ../../functions/funthread.h
|
||||
init.o: ../../functions/cp.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/ln.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/specialdefault.h
|
||||
init.o: ../../functions/stat.h ../../functions/subject.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 ../../functions/functionbase.h
|
||||
init.o: ../../core/synchro.h editticket.h createticket.h showtickets.h
|
||||
init.o: ../../core/log.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/system.h ../../core/sessionmanager.h
|
||||
init.o: ../../core/sessioncontainer.h ../../templates/templates.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: sessiondata.h ../../core/plugindata.h
|
||||
sessiondata.o: sessiondata.h ../../core/plugindata.h ticket.h
|
||||
showtickets.o: showtickets.h tdb.h ticket.h ../../db/dbbase.h
|
||||
showtickets.o: ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
showtickets.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
|
||||
showtickets.o: ../../core/error.h ../../core/log.h ../../core/textstream.h
|
||||
showtickets.o: ticketinfo.h ticketparser.h ticketconf.h ../../core/item.h
|
||||
showtickets.o: ../../core/system.h ../../core/dirs.h
|
||||
showtickets.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
showtickets.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
showtickets.o: ../../core/user.h ../../core/group.h ../../core/thread.h
|
||||
showtickets.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
showtickets.o: ../../core/request.h ../../notify/notify.h
|
||||
showtickets.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
showtickets.o: ../../core/confparser.h ../../templates/misc.h
|
||||
showtickets.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
showtickets.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
showtickets.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
showtickets.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
showtickets.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
showtickets.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
showtickets.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
showtickets.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
showtickets.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
showtickets.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
|
||||
showtickets.o: ../../core/mountparser.h ../../core/config.h
|
||||
showtickets.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
showtickets.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
showtickets.o: ../../core/rebus.h ../../core/loadavg.h ../../core/thumb.h
|
||||
showtickets.o: ../../core/basethread.h ../../functions/functions.h
|
||||
showtickets.o: ../../functions/functionbase.h
|
||||
showtickets.o: ../../functions/functionparser.h ../../core/request.h
|
||||
showtickets.o: ../../core/requesttypes.h ../../core/session.h
|
||||
showtickets.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
showtickets.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
showtickets.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
showtickets.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
showtickets.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
showtickets.o: ../../functions/default.h ../../functions/download.h
|
||||
showtickets.o: ../../functions/emacs.h ../../functions/last.h
|
||||
showtickets.o: ../../functions/login.h ../../functions/logout.h
|
||||
showtickets.o: ../../functions/ln.h ../../functions/ls.h
|
||||
showtickets.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
showtickets.o: ../../functions/node.h ../../functions/priv.h
|
||||
showtickets.o: ../../functions/reload.h ../../functions/rm.h
|
||||
showtickets.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
showtickets.o: ../../functions/stat.h ../../functions/subject.h
|
||||
showtickets.o: ../../functions/funthread.h ../../functions/template.h
|
||||
showtickets.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
showtickets.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
showtickets.o: ../../functions/who.h ../../functions/vim.h
|
||||
showtickets.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
showtickets.o: ../../core/synchro.h
|
||||
tdb.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
|
||||
tdb.o: ../../core/item.h ../../core/error.h ../../core/log.h
|
||||
init.o: templates.h
|
||||
reply.o: reply.h ../../functions/functionbase.h ../../core/item.h
|
||||
reply.o: ../../db/db.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
reply.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
|
||||
reply.o: ../../core/item.h ../../core/error.h ../../core/log.h
|
||||
reply.o: ../../core/textstream.h ../../db/dbitemquery.h
|
||||
reply.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
reply.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
reply.o: ../../core/request.h ../../core/requesttypes.h ../../core/session.h
|
||||
reply.o: ../../core/error.h ../../core/user.h ../../core/plugindata.h
|
||||
reply.o: ../../core/rebus.h ../../core/config.h ../../core/confparser.h
|
||||
reply.o: ../../core/htmlfilter.h ../../templates/htmltextstream.h
|
||||
reply.o: ../../core/config.h ../../core/system.h ../../core/dirs.h
|
||||
reply.o: ../../core/dircontainer.h ../../core/request.h ../../notify/notify.h
|
||||
reply.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
reply.o: ../../core/confparser.h ../../templates/misc.h
|
||||
reply.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
reply.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
reply.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
reply.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
reply.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
reply.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
reply.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
reply.o: ../../core/users.h ../../core/ugcontainer.h
|
||||
reply.o: ../../core/lastcontainer.h ../../core/mounts.h ../../core/mount.h
|
||||
reply.o: ../../core/mountparser.h ../../core/users.h ../../core/groups.h
|
||||
reply.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
reply.o: ../../core/basethread.h ../../core/synchro.h tdb.h thread.h
|
||||
reply.o: ../../db/dbbase.h threadinfo.h ../../functions/functions.h
|
||||
reply.o: ../../functions/functionbase.h ../../functions/functionparser.h
|
||||
reply.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
reply.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
reply.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
reply.o: ../../functions/cp.h ../../functions/default.h
|
||||
reply.o: ../../functions/download.h ../../functions/emacs.h
|
||||
reply.o: ../../functions/last.h ../../functions/login.h
|
||||
reply.o: ../../functions/logout.h ../../functions/ln.h ../../functions/ls.h
|
||||
reply.o: ../../functions/mkdir.h ../../functions/mv.h ../../functions/node.h
|
||||
reply.o: ../../functions/priv.h ../../functions/reload.h ../../functions/rm.h
|
||||
reply.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
reply.o: ../../functions/stat.h ../../functions/subject.h
|
||||
reply.o: ../../functions/template.h ../../functions/tinymce.h
|
||||
reply.o: ../../functions/uname.h ../../functions/upload.h
|
||||
reply.o: ../../functions/uptime.h ../../functions/who.h ../../functions/vim.h
|
||||
reply.o: ../../core/htmlfilter.h ../../core/misc.h ../../core/plugin.h
|
||||
reply.o: pluginmsg.h ../../core/system.h ../../core/sessionmanager.h
|
||||
reply.o: ../../core/sessioncontainer.h ../../templates/templates.h
|
||||
reply.o: ../../templates/patterncacher.h ../../templates/ckeditorgetparser.h
|
||||
reply.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
reply.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
showthreads.o: showthreads.h ../../functions/functionbase.h ../../core/item.h
|
||||
showthreads.o: ../../db/db.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
showthreads.o: ../../db/dbtextstream.h ../../core/textstream.h
|
||||
showthreads.o: ../../core/misc.h ../../core/item.h ../../core/error.h
|
||||
showthreads.o: ../../core/log.h ../../core/textstream.h
|
||||
showthreads.o: ../../db/dbitemquery.h ../../db/dbitemcolumns.h
|
||||
showthreads.o: ../../core/user.h ../../core/group.h ../../core/dircontainer.h
|
||||
showthreads.o: ../../core/ugcontainer.h ../../core/request.h
|
||||
showthreads.o: ../../core/requesttypes.h ../../core/session.h
|
||||
showthreads.o: ../../core/error.h ../../core/user.h ../../core/plugindata.h
|
||||
showthreads.o: ../../core/rebus.h ../../core/config.h ../../core/confparser.h
|
||||
showthreads.o: ../../core/htmlfilter.h ../../templates/htmltextstream.h
|
||||
showthreads.o: ../../core/config.h ../../core/system.h ../../core/dirs.h
|
||||
showthreads.o: ../../core/dircontainer.h ../../core/request.h
|
||||
showthreads.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
showthreads.o: ../../templates/locale.h ../../core/confparser.h
|
||||
showthreads.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
showthreads.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
showthreads.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
showthreads.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
showthreads.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
showthreads.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
showthreads.o: ../../core/basethread.h ../../core/synchro.h
|
||||
showthreads.o: ../../notify/templatesnotify.h ../../core/users.h
|
||||
showthreads.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
showthreads.o: ../../core/mounts.h ../../core/mount.h
|
||||
showthreads.o: ../../core/mountparser.h ../../core/users.h
|
||||
showthreads.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
showthreads.o: ../../core/thumb.h ../../core/basethread.h
|
||||
showthreads.o: ../../core/synchro.h tdb.h thread.h ../../db/dbbase.h
|
||||
showthreads.o: threadinfo.h
|
||||
tdb.o: tdb.h thread.h ../../db/dbbase.h ../../core/error.h ../../core/log.h
|
||||
tdb.o: ../../core/textstream.h ../../core/log.h
|
||||
templates.o: threadinfo.h thread.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/dbconn.h
|
||||
templates.o: ../../db/dbtextstream.h ../../core/textstream.h
|
||||
templates.o: ../../core/misc.h ../../core/error.h ../../core/log.h
|
||||
templates.o: ../../core/textstream.h ../../db/dbitemquery.h
|
||||
templates.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
templates.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
templates.o: ../../core/request.h ../../notify/notify.h
|
||||
templates.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
templates.o: ../../core/confparser.h ../../templates/misc.h
|
||||
templates.o: ../../templates/localefilter.h ../../templates/locale.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/functions.h
|
||||
templates.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.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: ../../notify/notify.h ../../notify/notifypool.h
|
||||
templates.o: ../../templates/locale.h ../../core/confparser.h
|
||||
templates.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
templates.o: ../../templates/locale.h ../../templates/htmltextstream.h
|
||||
templates.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
templates.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
templates.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
templates.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
templates.o: ../../core/textstream.h ../../core/misc.h ../../core/config.h
|
||||
templates.o: ../../core/users.h ../../core/user.h ../../core/ugcontainer.h
|
||||
templates.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
templates.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
templates.o: ../../core/config.h ../../core/confparser.h
|
||||
templates.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
templates.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
templates.o: ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
templates.o: ../../functions/functionparser.h ../../core/request.h
|
||||
templates.o: ../../core/requesttypes.h ../../core/session.h
|
||||
templates.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
templates.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
templates.o: ../../core/ugcontainer.h ../../core/lastcontainer.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
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/rebus.h ../../core/loadavg.h ../../core/thumb.h
|
||||
templates.o: ../../core/basethread.h reply.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 ../../core/synchro.h tdb.h
|
||||
templates.o: ../../db/dbbase.h funthread.h createthread.h showthreads.h
|
||||
templates.o: ../../core/misc.h ../../core/plugin.h 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/ln.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/specialdefault.h
|
||||
templates.o: ../../functions/stat.h ../../functions/subject.h
|
||||
templates.o: ../../functions/funthread.h ../../functions/template.h
|
||||
templates.o: ../../functions/cp.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/ln.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/specialdefault.h ../../functions/stat.h
|
||||
templates.o: ../../functions/subject.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 tdb.h ../../db/dbbase.h
|
||||
templates.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
templates.o: editticket.h ../../functions/functionbase.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: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
templates.o: ../../core/htmlfilter.h ../../templates/templates.h
|
||||
templates.o: ../../templates/patterncacher.h
|
||||
templates.o: ../../templates/ckeditorgetparser.h
|
||||
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
templates.o: sessiondata.h ../../core/plugindata.h
|
||||
ticketconf.o: ticketconf.h
|
||||
ticketinfo.o: ticketinfo.h ticket.h ticketparser.h ticketconf.h
|
||||
ticketinfo.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
|
||||
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
|
||||
ticketinfo.o: ../../core/textstream.h ../../core/request.h
|
||||
ticketinfo.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
ticketinfo.o: ../../templates/locale.h ../../core/confparser.h
|
||||
ticketinfo.o: ../../templates/misc.h ../../templates/localefilter.h
|
||||
ticketinfo.o: ../../templates/locale.h ../../../ezc/src/ezc.h
|
||||
ticketinfo.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
ticketinfo.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
ticketinfo.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
ticketinfo.o: ../../templates/htmltextstream.h ../../notify/notifythread.h
|
||||
ticketinfo.o: ../../core/basethread.h ../../core/synchro.h
|
||||
ticketinfo.o: ../../notify/templatesnotify.h ../../core/textstream.h
|
||||
ticketinfo.o: ../../core/misc.h ../../core/config.h ../../core/users.h
|
||||
ticketinfo.o: ../../core/user.h ../../core/ugcontainer.h
|
||||
ticketinfo.o: ../../core/lastcontainer.h ../../core/mounts.h
|
||||
ticketinfo.o: ../../core/mount.h ../../core/error.h ../../core/mountparser.h
|
||||
ticketinfo.o: ../../core/config.h ../../core/confparser.h
|
||||
ticketinfo.o: ../../core/htmlfilter.h ../../core/users.h ../../core/groups.h
|
||||
ticketinfo.o: ../../core/group.h ../../core/rebus.h ../../core/loadavg.h
|
||||
ticketinfo.o: ../../core/thumb.h ../../core/basethread.h
|
||||
ticketinfo.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
ticketinfo.o: ../../functions/functionparser.h ../../core/request.h
|
||||
ticketinfo.o: ../../core/requesttypes.h ../../core/session.h
|
||||
ticketinfo.o: ../../core/plugindata.h ../../templates/htmltextstream.h
|
||||
ticketinfo.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
ticketinfo.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
ticketinfo.o: ../../functions/chown.h ../../functions/ckeditor.h
|
||||
ticketinfo.o: ../../functions/cp.h ../../functions/createthread.h
|
||||
ticketinfo.o: ../../functions/default.h ../../functions/download.h
|
||||
ticketinfo.o: ../../functions/emacs.h ../../functions/last.h
|
||||
ticketinfo.o: ../../functions/login.h ../../functions/logout.h
|
||||
ticketinfo.o: ../../functions/ln.h ../../functions/ls.h
|
||||
ticketinfo.o: ../../functions/mkdir.h ../../functions/mv.h
|
||||
ticketinfo.o: ../../functions/node.h ../../functions/priv.h
|
||||
ticketinfo.o: ../../functions/reload.h ../../functions/rm.h
|
||||
ticketinfo.o: ../../functions/run.h ../../functions/specialdefault.h
|
||||
ticketinfo.o: ../../functions/stat.h ../../functions/subject.h
|
||||
ticketinfo.o: ../../functions/funthread.h ../../functions/template.h
|
||||
ticketinfo.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
ticketinfo.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
ticketinfo.o: ../../functions/who.h ../../functions/vim.h
|
||||
ticketinfo.o: ../../core/htmlfilter.h tdb.h ../../db/dbbase.h
|
||||
ticketinfo.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
ticketinfo.o: ../../core/log.h ../../core/misc.h sessiondata.h
|
||||
ticketinfo.o: ../../core/plugindata.h
|
||||
ticketparser.o: ticketparser.h ticketconf.h ../../core/log.h
|
||||
ticketparser.o: ../../core/misc.h
|
||||
threadinfo.o: threadinfo.h thread.h ../../core/item.h ../../core/system.h
|
||||
threadinfo.o: ../../core/dirs.h ../../core/item.h ../../core/dircontainer.h
|
||||
threadinfo.o: ../../db/db.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
threadinfo.o: ../../db/dbtextstream.h ../../core/textstream.h
|
||||
threadinfo.o: ../../core/misc.h ../../core/error.h ../../core/log.h
|
||||
threadinfo.o: ../../core/textstream.h ../../db/dbitemquery.h
|
||||
threadinfo.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
threadinfo.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
threadinfo.o: ../../core/request.h ../../notify/notify.h
|
||||
threadinfo.o: ../../notify/notifypool.h ../../templates/locale.h
|
||||
threadinfo.o: ../../core/confparser.h ../../templates/misc.h
|
||||
threadinfo.o: ../../templates/localefilter.h ../../templates/locale.h
|
||||
threadinfo.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
threadinfo.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
threadinfo.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
threadinfo.o: ../../../ezc/src/stringconv.h ../../templates/htmltextstream.h
|
||||
threadinfo.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
threadinfo.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
threadinfo.o: ../../core/config.h ../../core/users.h ../../core/user.h
|
||||
threadinfo.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
threadinfo.o: ../../core/mounts.h ../../core/mount.h ../../core/error.h
|
||||
threadinfo.o: ../../core/mountparser.h ../../core/config.h
|
||||
threadinfo.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
threadinfo.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
threadinfo.o: ../../core/rebus.h ../../core/loadavg.h ../../core/thumb.h
|
||||
threadinfo.o: ../../core/basethread.h
|
||||
|
@@ -1 +1 @@
|
||||
o = createticket.o editticket.o funticket.o init.o sessiondata.o showtickets.o tdb.o templates.o ticketconf.o ticketinfo.o ticketparser.o
|
||||
o = createthread.o funthread.o init.o reply.o showthreads.o tdb.o templates.o threadinfo.o
|
||||
|
@@ -9,11 +9,14 @@
|
||||
|
||||
#include "createthread.h"
|
||||
#include "functions.h"
|
||||
#include "functions/functions.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
CreateThread::CreateThread()
|
||||
{
|
||||
fun.url = L"createthread";
|
||||
@@ -21,127 +24,65 @@ CreateThread::CreateThread()
|
||||
|
||||
|
||||
|
||||
void CreateThread::SetTDb(TDb * ptdb)
|
||||
{
|
||||
tdb = ptdb;
|
||||
}
|
||||
|
||||
void CreateThread::SetThreadInfo(ThreadInfo * pthread_info)
|
||||
{
|
||||
thread_info = pthread_info;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// returning true if we can create a thread in the current directory
|
||||
bool CreateThread::HasAccess(bool check_root)
|
||||
{
|
||||
if( request->dir_tab.empty() )
|
||||
return false;
|
||||
|
||||
if( request->is_item )
|
||||
return false;
|
||||
|
||||
if( !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
|
||||
if( !system->mounts.pmount || system->mounts.pmount->type != system->mounts.MountTypeThread() )
|
||||
return false;
|
||||
|
||||
if( !check_root && request->session && request->session->puser && request->session->puser->super_user )
|
||||
// super can create thread regardless of the restrictcreatethread option
|
||||
return true;
|
||||
|
||||
if( !system->mounts.pmount->IsPar(system->mounts.MountParCreatethreadOn()) )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->IsArg(system->mounts.MountParCreatethreadOn(), request->dir_tab.size()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CreateThread::HasAccess()
|
||||
{
|
||||
return HasAccess(false);
|
||||
}
|
||||
|
||||
|
||||
bool CreateThread::FunCreateThreadCheckAbuse()
|
||||
{
|
||||
if( !system->rebus.CheckRebus() )
|
||||
{
|
||||
request->status = WINIX_ERR_INCORRECT_REBUS;
|
||||
if( request->is_item || !system->HasWriteAccess(*request->dir_tab.back()) )
|
||||
return false;
|
||||
}
|
||||
|
||||
functions->CheckGetPostTimes();
|
||||
|
||||
if( request->session->spam_score > 0 )
|
||||
{
|
||||
request->status = WINIX_ERR_SPAM;
|
||||
log << log1 << "Content: ignoring due to suspected spamming" << logend;
|
||||
if( system->mounts.pmount->type != thread_info->mount_type_thread )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateThread::ReadThread()
|
||||
{
|
||||
thread.parent_id = request->dir_tab.back()->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateThread::AddThread()
|
||||
{
|
||||
thread.dir_id = request->dir_tab.back()->id;
|
||||
thread.closed = false;
|
||||
thread.items = 1;
|
||||
thread.last_item = request->item; // set by PostFunEmacsAdd()
|
||||
|
||||
request->status = db->AddThread(thread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateThread::PostFunCreateThreadLogAndRedirect()
|
||||
{
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log2 << "Content: added a new thread" << logend;
|
||||
system->RedirectToLastDir();
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Content: problem with adding a new thread, error code: "
|
||||
<< request->status << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CreateThread::MakePost()
|
||||
{
|
||||
functions->ReadItem(request->item, Item::dir);
|
||||
request->item.Clear();
|
||||
functions->ReadItem(request->item, Item::file);
|
||||
functions->SetUser(request->item);
|
||||
ReadThread();
|
||||
request->item.privileges = 0777; // !! tymczasowo 777 aby wszyscy mogli wysylac posty
|
||||
functions->PrepareUrl(request->item);
|
||||
request->item.parent_id = request->dir_tab.back()->id;
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
|
||||
if( !FunCreateThreadCheckAbuse() )
|
||||
{
|
||||
functions->ReadItemContentWithType(request->item); // for correctly displaying the form
|
||||
if( functions->CheckAbuse() )
|
||||
return;
|
||||
}
|
||||
|
||||
request->status = system->dirs.AddDirectory(request->item, true, 0, WINIX_NOTIFY_CODE_THREAD_ADD);
|
||||
request->status = system->AddFile(request->item);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
functions->ReadItemContentWithType(request->item);
|
||||
request->item.type = Item::file;
|
||||
request->item.privileges = 0644; // !! tymczasowo
|
||||
request->item.parent_id = request->dir_tab.back()->id;
|
||||
request->status = system->AddFile(request->item);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
AddThread();
|
||||
thread.Clear();
|
||||
thread.file_id = request->item.id;
|
||||
request->status = tdb->AddThread(thread);
|
||||
}
|
||||
|
||||
PostFunCreateThreadLogAndRedirect();
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log2 << "CreateThread: added a new thread" << logend;
|
||||
system->RedirectTo(request->item);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "CreateThread: problem with adding a new thread, error code: "
|
||||
<< request->status << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -11,7 +11,8 @@
|
||||
#define headerfile_winix_plugins_thread_createthread
|
||||
|
||||
#include "functions/functionbase.h"
|
||||
|
||||
#include "tdb.h"
|
||||
#include "threadinfo.h"
|
||||
|
||||
|
||||
namespace Thread
|
||||
@@ -23,18 +24,18 @@ class CreateThread : public FunctionBase
|
||||
public:
|
||||
|
||||
CreateThread();
|
||||
bool HasAccess(bool check_root);
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetThreadInfo(ThreadInfo * pthread_info);
|
||||
|
||||
private:
|
||||
|
||||
TDb * tdb;
|
||||
ThreadInfo * thread_info;
|
||||
Thread thread;
|
||||
|
||||
bool FunCreateThreadCheckAbuse();
|
||||
void ReadThread();
|
||||
void AddThread();
|
||||
void PostFunCreateThreadLogAndRedirect();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -18,72 +18,73 @@ namespace Thread
|
||||
FunThread::FunThread()
|
||||
{
|
||||
fun.url = L"thread";
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
void FunThread::SetTDb(TDb * ptdb)
|
||||
{
|
||||
tdb = ptdb;
|
||||
}
|
||||
|
||||
void FunThread::SetThreadInfo(ThreadInfo * pthread_info)
|
||||
{
|
||||
thread_info = pthread_info;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool FunThread::HasAccess()
|
||||
{
|
||||
return !request->is_item;
|
||||
if( !request->is_item )
|
||||
return false;
|
||||
|
||||
if( system->mounts.pmount->type != thread_info->mount_type_thread )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void FunThread::Clear()
|
||||
|
||||
|
||||
void FunThread::PrepareThread(long file_id)
|
||||
{
|
||||
thread.Clear();
|
||||
thread_tab.clear();
|
||||
}
|
||||
thread_info->Clear();
|
||||
|
||||
//request->status = tdb->GetThreadByFileId(file_id, thread);
|
||||
|
||||
void FunThread::CreateSortIndexByDate()
|
||||
{
|
||||
size_t i;
|
||||
request->status = tdb->GetAnswers(file_id, id_tab);
|
||||
|
||||
for(i = 0; i < thread_tab.size() ; ++i)
|
||||
if( !id_tab.empty() )
|
||||
{
|
||||
Item * pdir = system->dirs.GetDir(thread_tab[i].dir_id);
|
||||
DbItemQuery iq;
|
||||
|
||||
if( pdir )
|
||||
thread_tab[i].sort = (unsigned long)Time(pdir->date_creation);
|
||||
else
|
||||
thread_tab[i].sort = 0;
|
||||
if( system->mounts.pmount->IsArg(thread_info->mount_par_thread, L"sort_desc") )
|
||||
iq.sort_asc = false;
|
||||
|
||||
iq.WhereIdIn(id_tab);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
|
||||
|
||||
db->GetItems(thread_info->item_tab, iq);
|
||||
|
||||
thread_info->item_sort_tab.resize(thread_info->item_tab.size());
|
||||
|
||||
// thread_info.item_tab is already sorted (by the database)
|
||||
for(size_t i=0 ; i<thread_info->item_tab.size() ; ++i)
|
||||
thread_info->item_sort_tab[i] = &thread_info->item_tab[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool FunThread::FunThreadSort(const Thread & t1, const Thread & t2)
|
||||
{
|
||||
return t1.sort > t2.sort;
|
||||
system->CheckAccessToItems(thread_info->item_tab);
|
||||
}
|
||||
|
||||
|
||||
void FunThread::MakeGet()
|
||||
{
|
||||
is_thread = (db->GetThreadByDirId(request->dir_tab.back()->id, thread) == WINIX_ERR_OK);
|
||||
|
||||
DbItemQuery iq;
|
||||
|
||||
if( system->mounts.pmount->IsArg(system->mounts.MountParThread(), L"sort_desc") )
|
||||
iq.sort_asc = false;
|
||||
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
|
||||
|
||||
db->GetItems(request->item_tab, iq);
|
||||
db->GetThreads(request->dir_tab.back()->id, thread_tab);
|
||||
|
||||
system->CheckAccessToItems(request->item_tab);
|
||||
|
||||
CreateSortIndexByDate();
|
||||
std::sort(thread_tab.begin(), thread_tab.end(), FunThreadSort);
|
||||
|
||||
Clear();
|
||||
PrepareThread(request->item.id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
@@ -11,7 +11,9 @@
|
||||
#define headerfile_winix_plugins_thread_funthread
|
||||
|
||||
#include "functions/functionbase.h"
|
||||
#include "core/thread.h"
|
||||
#include "tdb.h"
|
||||
#include "threadinfo.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
@@ -25,17 +27,16 @@ public:
|
||||
FunThread();
|
||||
bool HasAccess();
|
||||
void MakeGet();
|
||||
void PrepareThread(long file_id);
|
||||
|
||||
// current thread (if exists)
|
||||
bool is_thread;
|
||||
Thread thread;
|
||||
std::vector<Thread> thread_tab;
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetThreadInfo(ThreadInfo * pthread_info);
|
||||
|
||||
private:
|
||||
|
||||
static bool FunThreadSort(const Thread & t1, const Thread & t2);
|
||||
void CreateSortIndexByDate();
|
||||
void Clear();
|
||||
TDb * tdb;
|
||||
ThreadInfo * thread_info;
|
||||
std::vector<long> id_tab;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -8,32 +8,42 @@
|
||||
*/
|
||||
|
||||
#include "tdb.h"
|
||||
#include "reply.h"
|
||||
#include "funthread.h"
|
||||
#include "createthread.h"
|
||||
#include "showthreads.h"
|
||||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
#include "pluginmsg.h"
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
const wchar_t plugin_name[] = L"thread";
|
||||
|
||||
TDb tdb;
|
||||
ThreadInfo thread_info;
|
||||
TDb tdb;
|
||||
ThreadInfo thread_info;
|
||||
|
||||
Reply fun_reply;
|
||||
FunThread fun_thread;
|
||||
CreateThread fun_create_thread;
|
||||
ShowThreads fun_show_threads;
|
||||
|
||||
|
||||
|
||||
void AddFunctions(PluginInfo & info)
|
||||
{
|
||||
info.functions->Add(fun_reply);
|
||||
info.functions->Add(fun_thread);
|
||||
info.functions->Add(fun_create_thread);
|
||||
info.functions->Add(fun_show_threads);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,87 +63,104 @@ void AddMounts(PluginInfo & info)
|
||||
{
|
||||
Mounts & m = info.system->mounts;
|
||||
|
||||
ticket_info.mount_type_thread = m.AddMountType(L"thread");
|
||||
ticket_info.mount_par_thread_enable = m.AddMountPar(L"thread_enable");
|
||||
thread_info.mount_type_thread = m.AddMountType(L"thread");
|
||||
thread_info.mount_par_thread = m.AddMountPar(L"thread");
|
||||
thread_info.mount_par_thread_dir = m.AddMountPar(L"thread_dir");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void ProcessRequest(PluginInfo & info)
|
||||
{
|
||||
if( info.request->function == &info.functions->fun_reload )
|
||||
{
|
||||
if( info.request->IsParam(L"tickets") )
|
||||
ticket_info.ReadTicketConf();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RemoveThread(PluginInfo & i)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InitTicket(PluginInfo & info)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void AddNotifyTemplate(PluginInfo & info)
|
||||
{
|
||||
ticket_info.template_index = info.system->notify.AddTemplate(L"notify_email_thread.txt");
|
||||
thread_info.template_index = info.system->notify.AddTemplate(L"notify_email_thread.txt");
|
||||
}
|
||||
|
||||
|
||||
void SetSortTab(PluginInfo & info)
|
||||
{
|
||||
if( !info.p1 )
|
||||
{
|
||||
log << log1 << "Thread: sort_tab pointer is not set" << logend;
|
||||
return;
|
||||
}
|
||||
|
||||
typedef std::vector<Item*> SortTab;
|
||||
SortTab * psort_tab = reinterpret_cast<SortTab*>(info.p1);
|
||||
|
||||
thread_info.item_sort_tab = *psort_tab;
|
||||
}
|
||||
|
||||
|
||||
void ReadThreads(PluginInfo & info)
|
||||
{
|
||||
fun_show_threads.ReadThreads();
|
||||
}
|
||||
|
||||
|
||||
void SetSortTabIndex(PluginInfo & info)
|
||||
{
|
||||
thread_sort_tab(info.l1);
|
||||
}
|
||||
|
||||
|
||||
void PrepareThread(PluginInfo & info)
|
||||
{
|
||||
fun_thread.PrepareThread(info.l1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
} // namespace Thread
|
||||
|
||||
|
||||
|
||||
void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace Ticket;
|
||||
using namespace Thread;
|
||||
|
||||
plugin.Assign(WINIX_CREATE_FUNCTIONS, AddFunctions);
|
||||
plugin.Assign(WINIX_SELECT_DEFAULT_FUNCTION, SelectDefaultFunction);
|
||||
plugin.Assign(WINIX_ADD_MOUNTS, AddMounts);
|
||||
plugin.Assign(WINIX_FILE_REMOVED, RemoveThread);
|
||||
plugin.Assign(WINIX_PLUGIN_INIT, InitTicket);
|
||||
plugin.Assign(WINIX_NOTIFY_ADD_TEMPLATE, AddNotifyTemplate);
|
||||
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
|
||||
|
||||
// for other plugins
|
||||
plugin.Assign(WINIX_PL_THREAD_SET_SORTTAB, SetSortTab);
|
||||
plugin.Assign(WINIX_PL_THREAD_READ_THREADS, ReadThreads);
|
||||
plugin.Assign(WINIX_PL_THREAD_SET_SORTTAB_INDEX, SetSortTabIndex);
|
||||
plugin.Assign(WINIX_PL_THREAD_PREPARE_THREAD, PrepareThread);
|
||||
|
||||
tdb.SetConn(info.db->GetConn());
|
||||
tdb.LogQueries(info.config->log_db_query);
|
||||
|
||||
ticket_info.SetDb(info.db);
|
||||
ticket_info.SetTDb(&tdb);
|
||||
ticket_info.SetConfig(info.config);
|
||||
ticket_info.SetSystem(info.system);
|
||||
ticket_info.SetRequest(info.request);
|
||||
ticket_info.SetFunctions(info.functions);
|
||||
ticket_info.plugin_id = info.plugin_id;
|
||||
// thread_info and fun_show_threads are used in 'ticket' plugins too
|
||||
thread_info.SetSystem(info.system);
|
||||
thread_info.plugin_id = info.plugin_id;
|
||||
|
||||
fun_ticket.SetTDb(&tdb);
|
||||
fun_ticket.SetTicketInfo(&ticket_info);
|
||||
fun_reply.SetTDb(&tdb);
|
||||
fun_reply.SetThreadInfo(&thread_info);
|
||||
|
||||
fun_edit_ticket.SetTDb(&tdb);
|
||||
fun_edit_ticket.SetTicketInfo(&ticket_info);
|
||||
fun_thread.SetTDb(&tdb);
|
||||
fun_thread.SetThreadInfo(&thread_info);
|
||||
|
||||
fun_create_ticket.SetTDb(&tdb);
|
||||
fun_create_ticket.SetTicketInfo(&ticket_info);
|
||||
fun_create_thread.SetTDb(&tdb);
|
||||
fun_create_thread.SetThreadInfo(&thread_info);
|
||||
|
||||
fun_show_tickets.SetTDb(&tdb);
|
||||
fun_show_tickets.SetTicketInfo(&ticket_info);
|
||||
fun_show_threads.SetTDb(&tdb);
|
||||
fun_show_threads.SetThreadInfo(&thread_info);
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
}
|
||||
|
23
plugins/thread/pluginmsg.h
Executable file
23
plugins/thread/pluginmsg.h
Executable file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_pluginmsg
|
||||
#define headerfile_winix_plugins_thread_pluginmsg
|
||||
|
||||
|
||||
|
||||
#define WINIX_PL_THREAD_SET_SORTTAB 4000
|
||||
#define WINIX_PL_THREAD_READ_THREADS 4001
|
||||
#define WINIX_PL_THREAD_SET_SORTTAB_INDEX 4002
|
||||
#define WINIX_PL_THREAD_CAN_USE_REPLY 4003
|
||||
#define WINIX_PL_THREAD_PREPARE_THREAD 4004
|
||||
|
||||
#endif
|
||||
|
||||
|
115
plugins/thread/reply.cpp
Executable file
115
plugins/thread/reply.cpp
Executable file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "reply.h"
|
||||
#include "functions/functions.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/plugin.h"
|
||||
#include "pluginmsg.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
Reply::Reply()
|
||||
{
|
||||
fun.url = L"reply";
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Reply::SetTDb(TDb * ptdb)
|
||||
{
|
||||
tdb = ptdb;
|
||||
}
|
||||
|
||||
|
||||
void Reply::SetThreadInfo(ThreadInfo * pthread_info)
|
||||
{
|
||||
thread_info = pthread_info;
|
||||
}
|
||||
|
||||
|
||||
bool Reply::HasAccess()
|
||||
{
|
||||
if( !request->is_item )
|
||||
return false;
|
||||
|
||||
Item * dir = thread_info->FindThreadDir();
|
||||
|
||||
if( !dir || !system->HasWriteAccess(*dir) )
|
||||
return false;
|
||||
|
||||
plugin.Call(WINIX_PL_THREAD_CAN_USE_REPLY);
|
||||
|
||||
if( plugin.True() > 0 )
|
||||
return true;
|
||||
|
||||
if( system->mounts.pmount->type != thread_info->mount_type_thread )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Reply::MakePost()
|
||||
{
|
||||
Item * dir = thread_info->FindThreadDir();
|
||||
|
||||
if( !dir )
|
||||
{
|
||||
request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
|
||||
if( tdb->GetThreadByFileId(request->item.id, thread) != WINIX_ERR_OK )
|
||||
{
|
||||
thread.Clear();
|
||||
thread.file_id = request->item.id;
|
||||
tdb->AddThread(thread);
|
||||
}
|
||||
|
||||
answer.Clear();
|
||||
answer.url = request->item.url;
|
||||
answer.url += L"_msg_";
|
||||
answer.url += Toa(thread.replies + 1);
|
||||
answer.subject = answer.url;
|
||||
functions->ReadItem(answer, Item::file);
|
||||
functions->SetUser(answer);
|
||||
functions->PrepareUrl(answer);
|
||||
answer.parent_id = dir->id;
|
||||
answer.privileges = 0644; // !! tymczasowo
|
||||
|
||||
if( functions->CheckAbuse() )
|
||||
return;
|
||||
|
||||
request->status = system->AddFile(answer);
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
request->status = tdb->EditThreadAddItem(request->item.id, answer.id);
|
||||
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log2 << "Reply: added an answer in a thread" << logend;
|
||||
system->RedirectTo(request->item);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Reply: problem with adding an answer, error code: "
|
||||
<< request->status << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
47
plugins/thread/reply.h
Executable file
47
plugins/thread/reply.h
Executable file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_reply
|
||||
#define headerfile_winix_plugins_thread_reply
|
||||
|
||||
#include "functions/functionbase.h"
|
||||
#include "tdb.h"
|
||||
#include "threadinfo.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
class Reply : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
Reply();
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetThreadInfo(ThreadInfo * pthread_info);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TDb * tdb;
|
||||
ThreadInfo * thread_info;
|
||||
Item answer;
|
||||
Thread thread;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
@@ -6,16 +6,142 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include "showthreads.h"
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
ShowThreads::ShowThreads()
|
||||
{
|
||||
fun.url = L"showthreads";
|
||||
}
|
||||
|
||||
|
||||
void ShowThreads::SetTDb(TDb * ptdb)
|
||||
{
|
||||
tdb = ptdb;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ShowThreads::SetThreadInfo(ThreadInfo * pthread_info)
|
||||
{
|
||||
thread_info = pthread_info;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool ShowThreads::HasAccess()
|
||||
{
|
||||
if( request->is_item )
|
||||
return false;
|
||||
|
||||
if( system->mounts.pmount->type != thread_info->mount_type_thread )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool ShowThreads::Sort::operator()(const Item * item1, const Item * item2)
|
||||
{
|
||||
if( sort_type == 0 )
|
||||
{
|
||||
// sorting by url
|
||||
return item1->url < item2->url;
|
||||
}
|
||||
else
|
||||
{
|
||||
// sorting by date
|
||||
tm tm1 = item1->date_creation;
|
||||
tm tm2 = item2->date_creation;
|
||||
|
||||
time_t time1 = Time(tm1);
|
||||
time_t time2 = Time(tm2);
|
||||
|
||||
return time1 > time2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ShowThreads::ReadFiles()
|
||||
{
|
||||
// reading files
|
||||
DbItemQuery iq;
|
||||
iq.SetAll(false, false);
|
||||
iq.sel_url = true;
|
||||
iq.sel_subject = true;
|
||||
iq.sel_date = true;
|
||||
iq.sel_user_id = true;
|
||||
iq.sel_group_id = true;
|
||||
iq.sel_guest_name = true;
|
||||
iq.sel_privileges = true;
|
||||
iq.sel_date = true;
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
|
||||
|
||||
db->GetItems(thread_info->item_tab, iq);
|
||||
system->CheckAccessToItems(thread_info->item_tab);
|
||||
}
|
||||
|
||||
|
||||
void ShowThreads::ReadThreads()
|
||||
{
|
||||
// reading threads for the files
|
||||
file_id_tab.resize(thread_info->item_sort_tab.size());
|
||||
|
||||
for(size_t i=0 ; i<thread_info->item_sort_tab.size() ; ++i)
|
||||
file_id_tab[i] = thread_info->item_sort_tab[i]->id;
|
||||
|
||||
tdb->GetThreads(file_id_tab, thread_info->thread_tab);
|
||||
}
|
||||
|
||||
|
||||
void ShowThreads::CreatePointers()
|
||||
{
|
||||
// creating a pointers table
|
||||
thread_info->item_sort_tab.resize(thread_info->item_tab.size());
|
||||
|
||||
for(size_t i=0 ; i<thread_info->item_tab.size() ; ++i)
|
||||
thread_info->item_sort_tab[i] = &thread_info->item_tab[i];
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ShowThreads::SortPointers()
|
||||
{
|
||||
int sort_type = 1;
|
||||
|
||||
if( request->ParamValue(L"sort") == L"url" )
|
||||
sort_type = 0;
|
||||
|
||||
std::vector<Item*> & table = thread_info->item_sort_tab;
|
||||
std::sort(table.begin(), table.end(), Sort(this, sort_type));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ShowThreads::MakeGet()
|
||||
{
|
||||
thread_info->Clear();
|
||||
|
||||
ReadFiles();
|
||||
CreatePointers();
|
||||
SortPointers();
|
||||
ReadThreads();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#define headerfile_winix_plugins_thread_showthreads
|
||||
|
||||
#include "functions/functionbase.h"
|
||||
#include "tdb.h"
|
||||
#include "threadinfo.h"
|
||||
|
||||
|
||||
|
||||
@@ -22,11 +24,36 @@ class ShowThreads : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
ShowThreads();
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
void MakeGet();
|
||||
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetThreadInfo(ThreadInfo * pthread_info);
|
||||
|
||||
void ReadThreads();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
TDb * tdb;
|
||||
ThreadInfo * thread_info;
|
||||
std::vector<long> file_id_tab;
|
||||
|
||||
void ReadFiles();
|
||||
void CreatePointers();
|
||||
void SortPointers();
|
||||
|
||||
struct Sort
|
||||
{
|
||||
ShowThreads * show_threads;
|
||||
int sort_type;
|
||||
Sort(ShowThreads * show, int type) : show_threads(show), sort_type(type) {}
|
||||
bool operator()(const Item * item1, const Item * item2);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -17,7 +17,48 @@ namespace Thread
|
||||
|
||||
|
||||
|
||||
Error Db::GetThreadByDirId(long dir_id, Thread & thread)
|
||||
Error TDb::AddThread(const Thread & thread)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("insert into plugins.thread (file_id, replies, last_item, closed) values (")
|
||||
<< thread.file_id
|
||||
<< thread.replies
|
||||
<< thread.last_item_id
|
||||
<< (thread.closed ? 1 : 0 )
|
||||
<< R(");");
|
||||
|
||||
return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TDb::SetThreadColumns(PGresult * r)
|
||||
{
|
||||
cfile_id = AssertColumn(r, "file_id");
|
||||
creplies = AssertColumn(r, "replies");
|
||||
cclosed = AssertColumn(r, "closed");
|
||||
clast_item = AssertColumn(r, "last_item");
|
||||
cdate_modification = AssertColumn(r, "date_modification");
|
||||
cuser_id = AssertColumn(r, "user_id");
|
||||
cguest = AssertColumn(r, "guest_name");
|
||||
}
|
||||
|
||||
|
||||
void TDb::SetThread(PGresult * r, int col, Thread & thread)
|
||||
{
|
||||
thread.file_id = AssertValueLong(r, col, cfile_id);
|
||||
thread.replies = AssertValueLong(r, col, creplies);
|
||||
thread.closed = AssertValueBool(r, col, cclosed);
|
||||
thread.last_item_id = AssertValueLong(r, col, clast_item);
|
||||
thread.last_item_date_modification = AssertValueTm(r, col, cdate_modification);
|
||||
thread.last_item_user_id = AssertValueLong(r, col, cuser_id);
|
||||
AssertValueWide(r, col, cguest, thread.last_item_guest_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Error TDb::GetThreadByFileId(long file_id, Thread & thread)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
@@ -25,10 +66,10 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread)
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, thread.items, "
|
||||
"thread.last_item, item.date_modification, item.user_id "
|
||||
"from core.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.dir_id = ") << dir_id << R(";");
|
||||
query << R("select thread.file_id, thread.replies, thread.closed, thread.last_item, "
|
||||
"item.date_modification, item.user_id, item.guest_name "
|
||||
"from plugins.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.file_id = ") << file_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
@@ -36,29 +77,13 @@ Error Db::GetThreadByDirId(long dir_id, Thread & thread)
|
||||
int rows = Rows(r);
|
||||
|
||||
if( rows > 1 )
|
||||
log << log1 << "Db: there is more than one thread with dir_id: " << dir_id << logend;
|
||||
log << log1 << "ThreadDb: there is more than one thread with file_id: " << file_id << logend;
|
||||
else
|
||||
if( rows == 0 )
|
||||
throw Error(WINIX_ERR_NO_THREAD);
|
||||
|
||||
int cid = AssertColumn(r, "id");
|
||||
int cparent_id = AssertColumn(r, "parent_id");
|
||||
int cdir_id = AssertColumn(r, "dir_id");
|
||||
int cclosed = AssertColumn(r, "closed");
|
||||
int citems = AssertColumn(r, "items");
|
||||
int clast_item = AssertColumn(r, "last_item");
|
||||
|
||||
int cdate_modification = PQfnumber(r, "date_modification"); // !! tych kolumn mo<6D>e nie by<62>? czemu PQfnumber a nie AssertColumn?
|
||||
int cuser_id = PQfnumber(r, "user_id");
|
||||
|
||||
thread.id = AssertValueLong(r, 0, cid);
|
||||
thread.parent_id = AssertValueLong(r, 0, cparent_id);
|
||||
thread.dir_id = AssertValueLong(r, 0, cdir_id);
|
||||
thread.closed = AssertValueLong(r, 0, cclosed) == 0 ? false : true;
|
||||
thread.items = AssertValueLong(r, 0, citems);
|
||||
thread.last_item.id = AssertValueLong(r, 0, clast_item);
|
||||
thread.last_item.date_modification = AssertValueTm(r, 0, cdate_modification);
|
||||
thread.last_item.user_id = AssertValueLong(r, 0, cuser_id);
|
||||
SetThreadColumns(r);
|
||||
SetThread(r, 0, thread);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
@@ -72,49 +97,36 @@ return status;
|
||||
|
||||
|
||||
|
||||
Error Db::GetThreads(long parent_id, std::vector<Thread> & thread_tab)
|
||||
Error TDb::GetThreads(const std::vector<long> & file_id_tab, std::vector<Thread> & thread_tab)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
thread_tab.clear();
|
||||
|
||||
if( file_id_tab.empty() )
|
||||
return status;
|
||||
|
||||
try
|
||||
{
|
||||
CreateIdList(file_id_tab, list_id);
|
||||
|
||||
// should be sorted by file_id (is used in binary search later)
|
||||
query.Clear();
|
||||
query << R("select thread.id, thread.parent_id, thread.dir_id, thread.closed, "
|
||||
"thread.items, thread.last_item, item.date_modification, item.user_id, item.guest_name "
|
||||
"from core.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.parent_id = ") << parent_id << R(" order by date_modification asc;");
|
||||
query << R("select thread.file_id, thread.replies, thread.closed, thread.last_item, "
|
||||
"item.date_modification, item.user_id, item.guest_name "
|
||||
"from plugins.thread left join core.item on thread.last_item = item.id "
|
||||
"where thread.file_id in ") << R(list_id) << R(" order by file_id asc;");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
int rows = Rows(r);
|
||||
Thread thread;
|
||||
|
||||
int cid = AssertColumn(r, "id");
|
||||
int cparent_id = AssertColumn(r, "parent_id");
|
||||
int cdir_id = AssertColumn(r, "dir_id");
|
||||
int cclosed = AssertColumn(r, "closed");
|
||||
int citems = AssertColumn(r, "items");
|
||||
int clast_item = AssertColumn(r, "last_item");
|
||||
int cdate_modification = PQfnumber(r, "date_modification"); // !! czemu tutaj jest pqfnumber zamiast assertcolumn?
|
||||
int cuser_id = PQfnumber(r, "user_id");
|
||||
int cguest_name = PQfnumber(r, "guest_name");
|
||||
|
||||
SetThreadColumns(r);
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
{
|
||||
thread.id = AssertValueLong(r, i, cid);
|
||||
thread.parent_id = AssertValueLong(r, i, cparent_id);
|
||||
thread.dir_id = AssertValueLong(r, i, cdir_id);
|
||||
thread.closed = AssertValueLong(r, i, cclosed) == 0 ? false : true;
|
||||
thread.items = AssertValueLong(r, i, citems);
|
||||
thread.last_item.id = AssertValueLong(r, i, clast_item);
|
||||
thread.last_item.date_modification = AssertValueTm(r, i, cdate_modification);
|
||||
thread.last_item.user_id = AssertValueLong(r, i, cuser_id);
|
||||
thread.last_item.guest_name = AssertValueWide(r, i, cguest_name);
|
||||
|
||||
thread_tab.push_back(thread);
|
||||
SetThread(r, i, thread_temp);
|
||||
thread_tab.push_back(thread_temp);
|
||||
}
|
||||
}
|
||||
catch(const Error & e)
|
||||
@@ -129,28 +141,26 @@ return status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Error Db::AddThread(Thread & thread)
|
||||
Error TDb::GetAnswers(long file_id, std::vector<long> & answer_id_tab)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
answer_id_tab.clear();
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("insert into core.thread (parent_id, dir_id, closed, items, last_item) values (")
|
||||
<< thread.parent_id
|
||||
<< thread.dir_id
|
||||
<< (thread.closed ? 1 : 0 )
|
||||
<< thread.items
|
||||
<< thread.last_item.id
|
||||
<< R(");");
|
||||
query << R("select answer_id from plugins.thread_files "
|
||||
"where file_id = ") << file_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
thread.id = AssertCurrval("core.thread_id_seq");
|
||||
int rows = Rows(r);
|
||||
answer_id_tab.resize(rows);
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
answer_id_tab[i] = AssertValueLong(r, i, 0);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
@@ -164,47 +174,43 @@ return status;
|
||||
|
||||
|
||||
|
||||
Error Db::EditThreadAddItem(long dir_id, long item_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("update core.thread set (last_item, items) = (")
|
||||
<< item_id
|
||||
<< R(", items+1) where dir_id=")
|
||||
<< dir_id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return status;
|
||||
Error TDb::EditThreadAddItem(long file_id, long item_id)
|
||||
{
|
||||
query.Clear();
|
||||
query << R("insert into plugins.thread_files (file_id, answer_id) values (")
|
||||
<< file_id
|
||||
<< item_id
|
||||
<< R(");");
|
||||
|
||||
Error status = DoCommand(query);
|
||||
|
||||
if( status != WINIX_ERR_OK )
|
||||
return status;
|
||||
|
||||
query.Clear();
|
||||
query << R("update plugins.thread set (last_item, replies) = (")
|
||||
<< item_id
|
||||
<< R(", replies+1) where file_id=")
|
||||
<< file_id
|
||||
<< R(";");
|
||||
|
||||
return DoCommand(query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error Db::EditThreadRemoveItem(long dir_id)
|
||||
long TDb::FindLastItem(long file_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
long last_item_id = -1;
|
||||
|
||||
try
|
||||
{
|
||||
long last_item_id = -1;
|
||||
|
||||
query.Clear();
|
||||
query << R("select id from core.item where parent_id=")
|
||||
<< dir_id
|
||||
query << R("select id from plugins.thread_files left join core.item on item.id=answer_id where file_id=")
|
||||
<< file_id
|
||||
<< R(" order by date_creation desc limit 1;");
|
||||
|
||||
r = AssertQuery(query);
|
||||
@@ -212,18 +218,6 @@ Error Db::EditThreadRemoveItem(long dir_id)
|
||||
|
||||
if( Rows(r) == 1 )
|
||||
last_item_id = AssertValueLong(r, 0, 0);
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
query.Clear();
|
||||
query << R("update core.thread set (items, last_item) = (items-1,")
|
||||
<< last_item_id
|
||||
<< R(") where dir_id=")
|
||||
<< dir_id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
@@ -232,13 +226,92 @@ Error Db::EditThreadRemoveItem(long dir_id)
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return last_item_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error TDb::EditThreadRemoveItem(long item_id)
|
||||
{
|
||||
PGresult * r1 = 0;
|
||||
PGresult * r2 = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
// selecting files which have item_id as an answer
|
||||
query.Clear();
|
||||
query << R("select file_id from plugins.thread_files where answer_id = ")
|
||||
<< item_id
|
||||
<< R(";");
|
||||
|
||||
r1 = AssertQuery(query);
|
||||
AssertResult(r1, PGRES_TUPLES_OK);
|
||||
|
||||
int rows = Rows(r1);
|
||||
file_id_tab.resize(rows);
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
file_id_tab[i] = AssertValueLong(r1, i, 0);
|
||||
|
||||
// deleting those answers
|
||||
query.Clear();
|
||||
query << R("delete from plugins.thread_files where answer_id = ")
|
||||
<< item_id
|
||||
<< R(";");
|
||||
|
||||
r2 = AssertQuery(query);
|
||||
AssertResult(r2, PGRES_COMMAND_OK);
|
||||
|
||||
rows = AffectedRows(r2);
|
||||
|
||||
if( rows > 0 )
|
||||
log << log2 << "ThreadDb: deleted " << rows << " rows from plugins.thread_files" << logend;
|
||||
|
||||
// setting new last_items to the files
|
||||
status = EditThreadRecalcFiles(file_id_tab);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
status = e;
|
||||
}
|
||||
|
||||
ClearResult(r1);
|
||||
ClearResult(r2);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Error TDb::EditThreadRecalcFiles(const std::vector<long> & file_id_tab)
|
||||
{
|
||||
for(size_t i=0 ; i<file_id_tab.size() ; ++i)
|
||||
{
|
||||
long file_id = file_id_tab[i];
|
||||
long last_item_id = FindLastItem(file_id);
|
||||
|
||||
query.Clear();
|
||||
query << R("update plugins.thread set (replies, last_item) = (replies-1,")
|
||||
<< last_item_id
|
||||
<< R(") where file_id=")
|
||||
<< file_id
|
||||
<< R(";");
|
||||
|
||||
Error status = DoCommand(query);
|
||||
|
||||
Error Db::RemoveThread(long dir_id)
|
||||
if( status != WINIX_ERR_OK )
|
||||
return status;
|
||||
}
|
||||
|
||||
return WINIX_ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Error TDb::RemoveThread(long file_id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error status = WINIX_ERR_OK;
|
||||
@@ -246,7 +319,7 @@ Error Db::RemoveThread(long dir_id)
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R("delete from core.thread where dir_id=") << dir_id << R(";");
|
||||
query << R("delete from plugins.thread where file_id=") << file_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
@@ -254,7 +327,20 @@ Error Db::RemoveThread(long dir_id)
|
||||
long rows = AffectedRows(r);
|
||||
|
||||
if( rows > 0 )
|
||||
log << log2 << "Db: deleted " << rows << " rows from core.thread" << logend;
|
||||
log << log2 << "ThreadDb: deleted " << rows << " rows from plugins.thread" << logend;
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
query.Clear();
|
||||
query << R("delete from plugins.thread_files where file_id=") << file_id << R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_COMMAND_OK);
|
||||
|
||||
rows = AffectedRows(r);
|
||||
|
||||
if( rows > 0 )
|
||||
log << log2 << "ThreadDb: deleted " << rows << " rows from plugins.thread_files" << logend;
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include "ticket.h"
|
||||
#include "thread.h"
|
||||
#include "db/dbbase.h"
|
||||
#include "core/error.h"
|
||||
|
||||
@@ -25,17 +25,26 @@ class TDb : public DbBase
|
||||
{
|
||||
public:
|
||||
|
||||
Error AddThread(Thread & thread);
|
||||
Error GetThreadByDirId(long dir_id, Thread & thread);
|
||||
Error GetThreads(long parent_id, std::vector<Thread> & thread_tab);
|
||||
Error EditThreadAddItem(long dir_id, long item_id);
|
||||
Error EditThreadRemoveItem(long dir_id);
|
||||
Error RemoveThread(long dir_id);
|
||||
|
||||
Error AddThread(const Thread & thread);
|
||||
Error GetThreadByFileId(long file_id, Thread & thread);
|
||||
Error GetThreads(const std::vector<long> & file_id_tab, std::vector<Thread> & thread_tab);
|
||||
Error GetAnswers(long file_id, std::vector<long> & answer_id_tab);
|
||||
Error EditThreadAddItem(long file_id, long item_id);
|
||||
Error EditThreadRemoveItem(long file_id);
|
||||
Error RemoveThread(long file_id);
|
||||
long FindLastItem(long file_id);
|
||||
|
||||
private:
|
||||
|
||||
DbTextStream query;
|
||||
std::wstring list_id;
|
||||
int cfile_id, creplies, cclosed, clast_item, cdate_modification, cuser_id, cguest;
|
||||
Thread thread_temp;
|
||||
std::vector<long> file_id_tab;
|
||||
|
||||
void SetThreadColumns(PGresult * r);
|
||||
void SetThread(PGresult * r, int col, Thread & thread);
|
||||
Error EditThreadRecalcFiles(const std::vector<long> & file_id_tab);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -7,10 +7,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "templates.h"
|
||||
#include "misc.h"
|
||||
#include "threadinfo.h"
|
||||
#include "reply.h"
|
||||
#include "funthread.h"
|
||||
#include "createthread.h"
|
||||
#include "showthreads.h"
|
||||
#include "core/request.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/plugin.h"
|
||||
#include "templates/templates.h"
|
||||
#include "functions/functions.h"
|
||||
|
||||
|
||||
@@ -22,188 +27,497 @@ using TemplatesFunctions::system;
|
||||
|
||||
|
||||
extern ThreadInfo thread_info;
|
||||
extern Reply fun_reply;
|
||||
extern FunThread fun_thread;
|
||||
extern CreateThread fun_create_thread;
|
||||
extern ShowThreads fun_show_threads;
|
||||
|
||||
|
||||
static size_t item_sort_index;
|
||||
static HtmlTextStream item_run_content;
|
||||
static EzcGen ezc_generator;
|
||||
static bool has_thread;
|
||||
static size_t thread_index;
|
||||
|
||||
void thread_is(Info & i)
|
||||
|
||||
|
||||
// binary search for file_id in thread_tab (thread_tab must be sorted by id)
|
||||
bool FindThread(const std::vector<Thread> & thread_tab, long file_id, size_t & thread_index)
|
||||
{
|
||||
i.res = functions->fun_thread.is_thread;
|
||||
}
|
||||
if( thread_tab.empty() )
|
||||
return false;
|
||||
|
||||
size_t o1 = 0;
|
||||
size_t o2 = thread_tab.size() - 1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static size_t thread_tab_index;
|
||||
|
||||
|
||||
|
||||
void thread_tab(Info & i)
|
||||
{
|
||||
thread_tab_index = i.iter;
|
||||
|
||||
i.res = thread_tab_index < functions->fun_thread.thread_tab.size();
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_url(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( thread_tab[o1].file_id == file_id )
|
||||
{
|
||||
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
||||
|
||||
if( dir )
|
||||
{
|
||||
i.out << dir->url;
|
||||
}
|
||||
thread_index = o1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( file_id < thread_tab[o1].file_id )
|
||||
return false;
|
||||
|
||||
if( thread_tab[o2].file_id == file_id )
|
||||
{
|
||||
thread_index = o2;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( file_id > thread_tab[o2].file_id )
|
||||
return false;
|
||||
|
||||
|
||||
while( o1 + 1 < o2 )
|
||||
{
|
||||
thread_index = (o1 + o2) / 2;
|
||||
|
||||
if( thread_tab[thread_index].file_id == file_id )
|
||||
return true;
|
||||
|
||||
if( thread_tab[thread_index].file_id < file_id )
|
||||
o1 = thread_index;
|
||||
else
|
||||
{
|
||||
i.out << "<!-- unknown directory -->"; // !! do konfiga
|
||||
}
|
||||
o2 = thread_index;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool thread_sort_tab(size_t sort_index)
|
||||
{
|
||||
bool res;
|
||||
|
||||
item_sort_index = sort_index;
|
||||
res = item_sort_index < thread_info.item_sort_tab.size();
|
||||
has_thread = false;
|
||||
|
||||
if( res )
|
||||
{
|
||||
long file_id = thread_info.item_sort_tab[item_sort_index]->id;
|
||||
has_thread = FindThread(thread_info.thread_tab, file_id, thread_index);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab(Info & i)
|
||||
{
|
||||
i.res = thread_sort_tab(i.iter);
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_id(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << thread_info.item_sort_tab[item_sort_index]->id;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_subject(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << thread_info.item_sort_tab[item_sort_index]->subject;
|
||||
}
|
||||
|
||||
void thread_sort_tab_subject_noescape(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << R(thread_info.item_sort_tab[item_sort_index]->subject);
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_content(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << thread_info.item_sort_tab[item_sort_index]->content;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_content_noescape(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << R(thread_info.item_sort_tab[item_sort_index]->content);
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_print_content(Info & i)
|
||||
{
|
||||
if( item_sort_index >= thread_info.item_sort_tab.size() )
|
||||
return;
|
||||
|
||||
std::wstring & content = thread_info.item_sort_tab[item_sort_index]->content;
|
||||
Item::ContentType type = thread_info.item_sort_tab[item_sort_index]->content_type;
|
||||
|
||||
item_print_content(i.out, content, type);
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_privileges(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << "0" << Toa(thread_info.item_sort_tab[item_sort_index]->privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_dir(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
std::wstring path;
|
||||
|
||||
if( system->dirs.MakePath(thread_info.item_sort_tab[item_sort_index]->parent_id, path) )
|
||||
i.out << path;
|
||||
else
|
||||
i.out << "/the path does not exist/"; // !! do konfiga
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_subject(Info & i)
|
||||
void thread_sort_tab_url(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << thread_info.item_sort_tab[item_sort_index]->url;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_link(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
||||
|
||||
if( dir )
|
||||
{
|
||||
if( !dir->subject.empty() )
|
||||
i.out << dir->subject;
|
||||
else
|
||||
i.out << dir->url;
|
||||
}
|
||||
else
|
||||
{
|
||||
i.out << "<!-- unknown subject -->"; // !! do konfiga
|
||||
}
|
||||
i.out << config->base_url;
|
||||
thread_sort_tab_dir(i);
|
||||
thread_sort_tab_url(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_answers(Info & i)
|
||||
|
||||
|
||||
void thread_sort_tab_can_read(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
long a = functions->fun_thread.thread_tab[thread_tab_index].items;
|
||||
if( system->HasReadAccess(*thread_info.item_sort_tab[item_sort_index]) )
|
||||
i.res = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_can_write(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = system->HasWriteAccess(*thread_info.item_sort_tab[item_sort_index]);
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_user(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->user_id);
|
||||
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_modification_user(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->modification_user_id);
|
||||
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_users_different(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
i.res = (thread_info.item_sort_tab[item_sort_index]->user_id != thread_info.item_sort_tab[item_sort_index]->modification_user_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_group(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
long group_id = thread_info.item_sort_tab[item_sort_index]->group_id;
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
// the first is created by the author
|
||||
// we count only the rest
|
||||
if( a > 0 )
|
||||
--a;
|
||||
|
||||
i.out << a;
|
||||
if( pgroup )
|
||||
i.out << pgroup->name;
|
||||
else
|
||||
i.out << group_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_author(Info & i)
|
||||
void thread_sort_tab_date_creation(Info & i)
|
||||
{
|
||||
bool unknown = true;
|
||||
|
||||
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
Item * dir = system->dirs.GetDir( functions->fun_thread.thread_tab[thread_tab_index].dir_id );
|
||||
|
||||
if( dir )
|
||||
tm rtm = system->LocalTime(thread_info.item_sort_tab[item_sort_index]->date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
tm rtm = system->LocalTime(thread_info.item_sort_tab[item_sort_index]->date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_date_creation_nice(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_creation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_date_modification_nice(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_modification);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_dates_equal(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
tm * ptm1 = &thread_info.item_sort_tab[item_sort_index]->date_creation;
|
||||
tm * ptm2 = &thread_info.item_sort_tab[item_sort_index]->date_modification;
|
||||
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_run(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
if( system->HasReadExecAccess(*thread_info.item_sort_tab[item_sort_index]) )
|
||||
{
|
||||
User * puser = system->users.GetUser(dir->user_id);
|
||||
unknown = false;
|
||||
|
||||
if( puser )
|
||||
i.out << puser->name;
|
||||
else
|
||||
{
|
||||
i.out << "~";
|
||||
|
||||
if( !dir->guest_name.empty() )
|
||||
i.out << dir->guest_name;
|
||||
else
|
||||
i.out << "guest"; // !! dodac do konfiga
|
||||
}
|
||||
Ezc::Pattern * p = pattern_cacher.GetPattern(*thread_info.item_sort_tab[item_sort_index]);
|
||||
|
||||
item_run_content.Clear();
|
||||
ezc_generator.Generate(item_run_content, *p);
|
||||
|
||||
item_print_content(i.out, item_run_content.Str(), thread_info.item_sort_tab[item_sort_index]->content_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
i.out << "<!-- run: permission denied -->";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( unknown )
|
||||
|
||||
|
||||
void thread_sort_tab_has_static_file(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
i.out << "<!-- unknown user -->";
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->file_type != WINIX_ITEM_FILETYPE_NONE &&
|
||||
!thread_info.item_sort_tab[item_sort_index]->file_path.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_last_item_date_modification(Info & i)
|
||||
void thread_sort_tab_has_thumb(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
||||
i.out << DateToStr( &functions->fun_thread.thread_tab[thread_tab_index].last_item.date_modification );
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->has_thumb;
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_last_item_date_modification_nice(Info & i)
|
||||
void thread_sort_tab_type_is_dir(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
||||
print_date_nice(i, functions->fun_thread.thread_tab[thread_tab_index].last_item.date_modification);
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->type == Item::dir;
|
||||
}
|
||||
|
||||
|
||||
void thread_tab_last_item_user(Info & i)
|
||||
void thread_sort_tab_type_is_file(Info & i)
|
||||
{
|
||||
if( thread_tab_index < functions->fun_thread.thread_tab.size() )
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->type == Item::file;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_type_is_symlink(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->type == Item::symlink;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_is_link_to(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = !thread_info.item_sort_tab[item_sort_index]->link_to.empty();
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_link_to(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.out << thread_info.item_sort_tab[item_sort_index]->link_to;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_is_link_redirect(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
i.res = thread_info.item_sort_tab[item_sort_index]->link_redirect == 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_has_thread(Info & i)
|
||||
{
|
||||
i.res = has_thread;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_sort_tab_replies(Info & i)
|
||||
{
|
||||
if( has_thread && thread_index < thread_info.thread_tab.size() )
|
||||
i.out << thread_info.thread_tab[thread_index].replies;
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_last_item_date_modification_nice(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
if( functions->fun_thread.thread_tab[thread_tab_index].last_item.id != -1 )
|
||||
if( has_thread && thread_index < thread_info.thread_tab.size() )
|
||||
{
|
||||
User * puser = system->users.GetUser( functions->fun_thread.thread_tab[thread_tab_index].last_item.user_id );
|
||||
|
||||
if( puser )
|
||||
i.out << puser->name;
|
||||
Thread & thread = thread_info.thread_tab[thread_index];
|
||||
|
||||
if( thread.last_item_id != -1 )
|
||||
print_date_nice(i, thread.last_item_date_modification);
|
||||
else
|
||||
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_modification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_sort_tab_last_item_user(Info & i)
|
||||
{
|
||||
if( item_sort_index < thread_info.item_sort_tab.size() )
|
||||
{
|
||||
if( has_thread && thread_index < thread_info.thread_tab.size() )
|
||||
{
|
||||
Thread & thread = thread_info.thread_tab[thread_index];
|
||||
|
||||
if( thread.last_item_id != -1 )
|
||||
{
|
||||
User * puser = system->users.GetUser(thread.last_item_user_id);
|
||||
print_user_name(i, puser, thread.last_item_guest_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
i.out << "~";
|
||||
|
||||
if( !functions->fun_thread.thread_tab[thread_tab_index].last_item.guest_name.empty() )
|
||||
i.out << functions->fun_thread.thread_tab[thread_tab_index].last_item.guest_name;
|
||||
else
|
||||
i.out << "guest"; // !! dodac do konfiga
|
||||
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->user_id);
|
||||
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void thread_can_reply(Info & i)
|
||||
{
|
||||
i.res = fun_reply.HasAccess();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void thread_can_create(Info & i)
|
||||
{
|
||||
i.res = functions->fun_createthread.HasAccess(true);
|
||||
i.res = fun_create_thread.HasAccess();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info)
|
||||
{
|
||||
using TemplatesFunctions::EzcFun;
|
||||
EzcFun * fun = reinterpret_cast<EzcFun*>(info.p1);
|
||||
|
||||
fun->Insert("thread_is", thread_is);
|
||||
fun->Insert("thread_tab", thread_tab);
|
||||
fun->Insert("thread_tab_url", thread_tab_url);
|
||||
fun->Insert("thread_tab_subject", thread_tab_subject);
|
||||
fun->Insert("thread_tab_author", thread_tab_author);
|
||||
fun->Insert("thread_tab_answers", thread_tab_answers);
|
||||
fun->Insert("thread_tab_last_item_date_modification", thread_tab_last_item_date_modification);
|
||||
fun->Insert("thread_tab_last_item_date_modification_nice", thread_tab_last_item_date_modification_nice);
|
||||
fun->Insert("thread_tab_last_item_user", thread_tab_last_item_user);
|
||||
fun->Insert("thread_can_create", thread_can_create);
|
||||
|
||||
fun->Insert("thread_sort_tab", thread_sort_tab);
|
||||
fun->Insert("thread_sort_tab_id", thread_sort_tab_id);
|
||||
fun->Insert("thread_sort_tab_subject", thread_sort_tab_subject);
|
||||
fun->Insert("thread_sort_tab_subject_noescape", thread_sort_tab_subject_noescape);
|
||||
fun->Insert("thread_sort_tab_content", thread_sort_tab_content);
|
||||
fun->Insert("thread_sort_tab_content_noescape", thread_sort_tab_content_noescape);
|
||||
fun->Insert("thread_sort_tab_print_content", thread_sort_tab_print_content);
|
||||
fun->Insert("thread_sort_tab_privileges", thread_sort_tab_privileges);
|
||||
fun->Insert("thread_sort_tab_dir", thread_sort_tab_dir);
|
||||
fun->Insert("thread_sort_tab_url", thread_sort_tab_url);
|
||||
fun->Insert("thread_sort_tab_link", thread_sort_tab_link);
|
||||
fun->Insert("thread_sort_tab_can_read", thread_sort_tab_can_read);
|
||||
fun->Insert("thread_sort_tab_can_write", thread_sort_tab_can_write);
|
||||
fun->Insert("thread_sort_tab_user", thread_sort_tab_user);
|
||||
fun->Insert("thread_sort_tab_modification_user", thread_sort_tab_modification_user);
|
||||
fun->Insert("thread_sort_tab_users_different", thread_sort_tab_users_different);
|
||||
fun->Insert("thread_sort_tab_group", thread_sort_tab_group);
|
||||
fun->Insert("thread_sort_tab_date_creation", thread_sort_tab_date_creation);
|
||||
fun->Insert("thread_sort_tab_date_modification", thread_sort_tab_date_modification);
|
||||
fun->Insert("thread_sort_tab_date_creation_nice", thread_sort_tab_date_creation_nice);
|
||||
fun->Insert("thread_sort_tab_date_modification_nice", thread_sort_tab_date_modification_nice);
|
||||
fun->Insert("thread_sort_tab_dates_equal", thread_sort_tab_dates_equal);
|
||||
fun->Insert("thread_sort_tab_run", thread_sort_tab_run);
|
||||
fun->Insert("thread_sort_tab_has_static_file", thread_sort_tab_has_static_file);
|
||||
fun->Insert("thread_sort_tab_has_thumb", thread_sort_tab_has_thumb);
|
||||
fun->Insert("thread_sort_tab_type_is_dir", thread_sort_tab_type_is_dir);
|
||||
fun->Insert("thread_sort_tab_type_is_file", thread_sort_tab_type_is_file);
|
||||
fun->Insert("thread_sort_tab_type_is_symlink", thread_sort_tab_type_is_symlink);
|
||||
fun->Insert("thread_sort_tab_is_link_to", thread_sort_tab_is_link_to);
|
||||
fun->Insert("thread_sort_tab_link_to", thread_sort_tab_link_to);
|
||||
fun->Insert("thread_sort_tab_is_link_redirect", thread_sort_tab_is_link_redirect);
|
||||
|
||||
fun->Insert("thread_sort_tab_has_thread", thread_sort_tab_has_thread);
|
||||
fun->Insert("thread_sort_tab_replies", thread_sort_tab_replies);
|
||||
fun->Insert("thread_sort_tab_last_item_date_modification_nice", thread_sort_tab_last_item_date_modification_nice);
|
||||
fun->Insert("thread_sort_tab_last_item_user", thread_sort_tab_last_item_user);
|
||||
|
||||
fun->Insert("thread_can_reply", thread_can_reply);
|
||||
fun->Insert("thread_can_create", thread_can_create);
|
||||
|
||||
}
|
||||
|
||||
|
31
plugins/thread/templates.h
Executable file
31
plugins/thread/templates.h
Executable file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_thread_templates
|
||||
#define headerfile_winix_plugins_thread_templates
|
||||
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
bool thread_sort_tab(size_t sort_index);
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#define headerfile_winix_plugins_thread_thread
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
namespace Thread
|
||||
@@ -24,36 +25,32 @@ class Thread
|
||||
public:
|
||||
|
||||
long file_id;
|
||||
|
||||
//long parent_id;
|
||||
|
||||
long dir_id;
|
||||
long replies;
|
||||
bool closed;
|
||||
|
||||
// how many items there are inside
|
||||
long items;
|
||||
|
||||
// last item in the directory (this variable is mainly for reading)
|
||||
// at the moment only used: id, date_modification, user_id
|
||||
Item last_item;
|
||||
|
||||
// used when sorting
|
||||
unsigned long sort;
|
||||
// the last file in a thread
|
||||
long last_item_id;
|
||||
tm last_item_date_modification;
|
||||
long last_item_user_id;
|
||||
std::wstring last_item_guest_name;
|
||||
|
||||
|
||||
|
||||
void Clear()
|
||||
{
|
||||
id = parent_id = dir_id = -1;
|
||||
last_item.Clear();
|
||||
closed = false;
|
||||
items = 0;
|
||||
sort = 0;
|
||||
file_id = -1;
|
||||
closed = false;
|
||||
replies = 0;
|
||||
last_item_id = -1;
|
||||
last_item_user_id = -1;
|
||||
memset(&last_item_date_modification, 0, sizeof(tm));
|
||||
last_item_guest_name.clear();
|
||||
}
|
||||
|
||||
Thread()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
56
plugins/thread/threadinfo.cpp
Executable file
56
plugins/thread/threadinfo.cpp
Executable file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "threadinfo.h"
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
|
||||
void ThreadInfo::SetSystem(System * psystem)
|
||||
{
|
||||
system = psystem;
|
||||
}
|
||||
|
||||
|
||||
void ThreadInfo::Clear()
|
||||
{
|
||||
item_tab.clear();
|
||||
thread_tab.clear();
|
||||
item_sort_tab.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Item * ThreadInfo::FindThreadDir()
|
||||
{
|
||||
const std::wstring & dir_str = system->mounts.pmount->FirstArg(mount_par_thread_dir);
|
||||
|
||||
if( dir_str.empty() )
|
||||
return 0;
|
||||
|
||||
int res = system->FollowAllLinks(dir_str, out_dir_tab, out_item);
|
||||
|
||||
if( res != 0 )
|
||||
return 0;
|
||||
|
||||
return out_dir_tab.back();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -10,23 +10,62 @@
|
||||
#ifndef headerfile_winix_plugins_thread_threadinfo
|
||||
#define headerfile_winix_plugins_thread_threadinfo
|
||||
|
||||
#include <vector>
|
||||
#include "thread.h"
|
||||
#include "core/item.h"
|
||||
#include "core/system.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Thread
|
||||
{
|
||||
|
||||
class ThreadInfo
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
// id of a mount type
|
||||
int mount_type_thread;
|
||||
|
||||
// enable a thread in a specific directory
|
||||
int mount_par_thread_enable;
|
||||
|
||||
|
||||
|
||||
void SetSystem(System * psystem);
|
||||
void Clear();
|
||||
Item * FindThreadDir();
|
||||
|
||||
// id of a mount type
|
||||
int mount_type_thread;
|
||||
|
||||
// enable a thread in a specific directory
|
||||
// and set sort type (asc, desc)
|
||||
int mount_par_thread;
|
||||
|
||||
// a special directory in which we store the answers
|
||||
int mount_par_thread_dir;
|
||||
|
||||
// id of the current plugin
|
||||
int plugin_id;
|
||||
|
||||
// files in the current directory
|
||||
// used for 'show_threads' or 'thread' function
|
||||
std::vector<Item> item_tab;
|
||||
|
||||
// additional info to the above files if 'show_threads' is used
|
||||
// sorted by file_id
|
||||
std::vector<Thread> thread_tab;
|
||||
|
||||
// for sorting
|
||||
std::vector<Item*> item_sort_tab;
|
||||
|
||||
// template index for notifications
|
||||
size_t template_index;
|
||||
|
||||
private:
|
||||
|
||||
System * system;
|
||||
|
||||
std::vector<Item*> out_dir_tab;
|
||||
Item out_item;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
@@ -147,6 +147,13 @@ funticket.o: ../../functions/uname.h ../../functions/upload.h
|
||||
funticket.o: ../../functions/uptime.h ../../functions/who.h
|
||||
funticket.o: ../../functions/vim.h ../../core/htmlfilter.h
|
||||
funticket.o: ../../functions/functionbase.h ../../core/synchro.h
|
||||
funticket.o: ../../core/plugin.h ../../core/pluginmsg.h ../../core/system.h
|
||||
funticket.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
funticket.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
funticket.o: ../../templates/ckeditorgetparser.h
|
||||
funticket.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
funticket.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
funticket.o: ../../plugins/thread/pluginmsg.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
|
||||
@@ -198,6 +205,8 @@ 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: sessiondata.h ../../core/plugindata.h
|
||||
init.o: ../../plugins/thread/showthreads.h ../../plugins/thread/threadinfo.h
|
||||
init.o: ../../plugins/thread/thread.h ../../plugins/thread/pluginmsg.h
|
||||
sessiondata.o: sessiondata.h ../../core/plugindata.h ticket.h
|
||||
showtickets.o: showtickets.h tdb.h ticket.h ../../db/dbbase.h
|
||||
showtickets.o: ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
@@ -247,7 +256,13 @@ showtickets.o: ../../functions/tinymce.h ../../functions/uname.h
|
||||
showtickets.o: ../../functions/upload.h ../../functions/uptime.h
|
||||
showtickets.o: ../../functions/who.h ../../functions/vim.h
|
||||
showtickets.o: ../../core/htmlfilter.h ../../functions/functionbase.h
|
||||
showtickets.o: ../../core/synchro.h
|
||||
showtickets.o: ../../core/synchro.h ../../plugins/thread/pluginmsg.h
|
||||
showtickets.o: ../../core/plugin.h ../../core/pluginmsg.h ../../core/system.h
|
||||
showtickets.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
showtickets.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
showtickets.o: ../../templates/ckeditorgetparser.h
|
||||
showtickets.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
showtickets.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
tdb.o: tdb.h ticket.h ../../db/dbbase.h ../../db/dbconn.h
|
||||
tdb.o: ../../db/dbtextstream.h ../../core/textstream.h ../../core/misc.h
|
||||
tdb.o: ../../core/item.h ../../core/error.h ../../core/log.h
|
||||
@@ -308,6 +323,7 @@ templates.o: ../../templates/ckeditorgetparser.h
|
||||
templates.o: ../../core/httpsimpleparser.h ../../core/log.h
|
||||
templates.o: ../../templates/indexpatterns.h ../../core/sessionmanager.h
|
||||
templates.o: sessiondata.h ../../core/plugindata.h
|
||||
templates.o: ../../plugins/thread/pluginmsg.h
|
||||
ticketconf.o: ticketconf.h
|
||||
ticketinfo.o: ticketinfo.h ticket.h ticketparser.h ticketconf.h
|
||||
ticketinfo.o: ../../core/item.h ../../core/system.h ../../core/dirs.h
|
||||
|
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
|
||||
#include "funticket.h"
|
||||
#include "core/plugin.h"
|
||||
#include "plugins/thread/pluginmsg.h"
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +49,8 @@ void FunTicket::MakeGet()
|
||||
ticket_info->ticket = &ticket;
|
||||
|
||||
tdb->GetTicket(request->item.id, ticket);
|
||||
|
||||
plugin.Call(WINIX_PL_THREAD_PREPARE_THREAD, request->item.id);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -15,6 +15,9 @@
|
||||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
#include "sessiondata.h"
|
||||
#include "plugins/thread/showthreads.h"
|
||||
#include "plugins/thread/pluginmsg.h"
|
||||
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
@@ -116,6 +119,15 @@ void RemoveSession(PluginInfo & info)
|
||||
}
|
||||
|
||||
|
||||
void CanUseReply(PluginInfo & info)
|
||||
{
|
||||
if( info.system->mounts.pmount && info.system->mounts.pmount->type == ticket_info.mount_type_ticket )
|
||||
info.res = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// defined in templates.cpp
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
} // namespace Ticket
|
||||
@@ -137,6 +149,7 @@ using namespace Ticket;
|
||||
plugin.Assign(WINIX_NOTIFY_ADD_TEMPLATE, AddNotifyTemplate);
|
||||
plugin.Assign(WINIX_SESSION_CREATED, CreateSession);
|
||||
plugin.Assign(WINIX_SESSION_REMOVE, RemoveSession);
|
||||
plugin.Assign(WINIX_PL_THREAD_CAN_USE_REPLY, CanUseReply);
|
||||
|
||||
tdb.SetConn(info.db->GetConn());
|
||||
tdb.LogQueries(info.config->log_db_query);
|
||||
|
@@ -10,6 +10,8 @@
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
#include "showtickets.h"
|
||||
#include "plugins/thread/pluginmsg.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
@@ -75,6 +77,11 @@ void ShowTickets::ReadFiles()
|
||||
iq.sel_url = true;
|
||||
iq.sel_subject = true;
|
||||
iq.sel_date = true;
|
||||
iq.sel_user_id = true;
|
||||
iq.sel_group_id = true;
|
||||
iq.sel_guest_name = true;
|
||||
iq.sel_privileges = true;
|
||||
iq.sel_date = true;
|
||||
iq.WhereParentId(request->dir_tab.back()->id);
|
||||
iq.WhereType(Item::file);
|
||||
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
|
||||
@@ -87,10 +94,10 @@ void ShowTickets::ReadFiles()
|
||||
void ShowTickets::ReadTickets()
|
||||
{
|
||||
// reading tickets for the files
|
||||
file_id_tab.resize(ticket_info->item_tab.size());
|
||||
file_id_tab.resize(ticket_info->item_sort_tab.size());
|
||||
|
||||
for(size_t i=0 ; i<ticket_info->item_tab.size() ; ++i)
|
||||
file_id_tab[i] = ticket_info->item_tab[i].id;
|
||||
for(size_t i=0 ; i<ticket_info->item_sort_tab.size() ; ++i)
|
||||
file_id_tab[i] = ticket_info->item_sort_tab[i]->id;
|
||||
|
||||
tdb->GetTickets(file_id_tab, ticket_info->ticket_tab);
|
||||
}
|
||||
@@ -111,7 +118,7 @@ void ShowTickets::SortPointers()
|
||||
{
|
||||
int sort_type = 1;
|
||||
|
||||
if( request->PostVar(L"sort") == L"url" )
|
||||
if( request->ParamValue(L"sort") == L"url" )
|
||||
sort_type = 0;
|
||||
|
||||
std::vector<Item*> & table = ticket_info->item_sort_tab;
|
||||
@@ -126,9 +133,12 @@ void ShowTickets::MakeGet()
|
||||
ticket_info->FindCurrentConf();
|
||||
|
||||
ReadFiles();
|
||||
ReadTickets();
|
||||
CreatePointers();
|
||||
SortPointers();
|
||||
ReadTickets();
|
||||
|
||||
plugin.Call(WINIX_PL_THREAD_SET_SORTTAB, &ticket_info->item_sort_tab);
|
||||
plugin.Call(WINIX_PL_THREAD_READ_THREADS);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -230,7 +230,7 @@ Error TDb::RemoveTicket(long file_id)
|
||||
long rows = AffectedRows(r);
|
||||
|
||||
if( rows > 0 )
|
||||
log << log2 << "Db: deleted " << rows << " rows from plugins.ticket" << logend;
|
||||
log << log2 << "TicketDb: deleted " << rows << " rows from plugins.ticket" << logend;
|
||||
|
||||
}
|
||||
catch(const Error & e)
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include "functions/functions.h"
|
||||
#include "templates/templates.h"
|
||||
#include "sessiondata.h"
|
||||
#include "plugins/thread/pluginmsg.h"
|
||||
|
||||
|
||||
|
||||
@@ -139,6 +140,8 @@ void tickets_tab(Info & i)
|
||||
ticket_index = a;
|
||||
}
|
||||
}
|
||||
|
||||
plugin.Call(WINIX_PL_THREAD_SET_SORTTAB_INDEX, item_sort_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,6 @@ struct Ticket
|
||||
{
|
||||
struct TicketParam
|
||||
{
|
||||
long file_id;
|
||||
int param;
|
||||
long int_value; // changed to long (from int)
|
||||
std::wstring str_value;
|
||||
@@ -40,6 +39,7 @@ struct Ticket
|
||||
}
|
||||
};
|
||||
|
||||
long file_id;
|
||||
std::vector<TicketParam> par_tab;
|
||||
|
||||
// auxiliary object used during sorting
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include "tdb.h"
|
||||
|
||||
|
||||
|
||||
namespace Ticket
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user