'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:
@@ -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