added: to plugin ticket: message WINIX_PL_TICKET_LOAD_TICKETS

someone can send this message with a directory id
       and tickets will be loaded from the directory
       (and to display them you can use ezc functions)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@889 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-09-14 23:48:39 +00:00
parent da15323c2f
commit 4ed535a3b7
9 changed files with 63 additions and 18 deletions

View File

@@ -63,7 +63,7 @@ bool ShowTickets::Sort::operator()(const Item * item1, const Item * item2)
void ShowTickets::ReadFiles()
void ShowTickets::ReadFiles(long dir_id)
{
// reading files
DbItemQuery iq;
@@ -77,7 +77,7 @@ void ShowTickets::ReadFiles()
iq.sel_privileges = true;
iq.sel_date = true;
iq.sel_meta = true;
iq.WhereParentId(cur->request->dir_tab.back()->id);
iq.WhereParentId(dir_id);
iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
@@ -128,22 +128,28 @@ void ShowTickets::ReadTickets()
}
void ShowTickets::MakeGet()
void ShowTickets::ShowTicketsFromDir(long dir_id)
{
ticket_info->Clear();
ticket_info->FindCurrentConf();
ticket_info->FindCurrentConf(dir_id);
ReadFiles();
ReadFiles(dir_id);
CreatePointers();
SortPointers();
ReadTickets();
// !! IMPROVE ME may a better name instead of WINIX_PL_THREAD_SET_SORTTAB?
plugin.Call(WINIX_PL_THREAD_SET_SORTTAB, &ticket_info->item_sort_tab);
plugin.Call(WINIX_PL_THREAD_READ_THREADS);
}
void ShowTickets::MakeGet()
{
ShowTicketsFromDir(cur->request->dir_tab.back()->id);
}
} // namespace