fixed in thread winix function: answers were not sorted correctly
This commit is contained in:
parent
ba60f9da8a
commit
df0cc131fe
|
@ -100,19 +100,20 @@ void FunThread::PrepareThread(long file_id)
|
||||||
{
|
{
|
||||||
morm::Finder<Item> finder(model_connector);
|
morm::Finder<Item> finder(model_connector);
|
||||||
|
|
||||||
thread_info->item_tab = finder.
|
finder.
|
||||||
select().
|
select().
|
||||||
where().
|
where().
|
||||||
in(L"id", id_tab).
|
in(L"id", id_tab).
|
||||||
eq(L"type", static_cast<int>(Item::file)).
|
eq(L"type", static_cast<int>(Item::file)).
|
||||||
eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE).
|
eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE);
|
||||||
get_vector();
|
|
||||||
|
|
||||||
if( system->mounts.pmount->IsArg(thread_info->mount_par_thread, L"sort_desc") )
|
if( system->mounts.pmount->IsArg(thread_info->mount_par_thread, L"sort_desc") )
|
||||||
finder.raw("order by content.date_creation desc");
|
finder.raw("order by content.date_creation desc");
|
||||||
else
|
else
|
||||||
finder.raw("order by content.date_creation asc");
|
finder.raw("order by content.date_creation asc");
|
||||||
|
|
||||||
|
thread_info->item_tab = finder.get_vector();
|
||||||
|
|
||||||
//db->GetItems(thread_info->item_tab, iq);
|
//db->GetItems(thread_info->item_tab, iq);
|
||||||
system->CheckAccessToItems(thread_info->item_tab);
|
system->CheckAccessToItems(thread_info->item_tab);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue