'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:
2011-01-20 18:37:51 +00:00
parent 3fad25b8c8
commit ab84a5169e
61 changed files with 1928 additions and 980 deletions

View File

@@ -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);
}