fixed in thread winix function: answers were not sorted correctly

This commit is contained in:
Tomasz Sowa 2021-06-28 21:33:33 +02:00
parent ba60f9da8a
commit df0cc131fe
1 changed files with 4 additions and 3 deletions

View File

@ -100,19 +100,20 @@ void FunThread::PrepareThread(long file_id)
{
morm::Finder<Item> finder(model_connector);
thread_info->item_tab = finder.
finder.
select().
where().
in(L"id", id_tab).
eq(L"type", static_cast<int>(Item::file)).
eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE).
get_vector();
eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE);
if( system->mounts.pmount->IsArg(thread_info->mount_par_thread, L"sort_desc") )
finder.raw("order by content.date_creation desc");
else
finder.raw("order by content.date_creation asc");
thread_info->item_tab = finder.get_vector();
//db->GetItems(thread_info->item_tab, iq);
system->CheckAccessToItems(thread_info->item_tab);