From 4df10de6b7b4f8194c6c02fefa9ace5962d872ee Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Thu, 13 May 2021 19:33:19 +0200 Subject: [PATCH] methods eq() from finder can have now a table name --- winixd/functions/imgcrop.cpp | 3 ++- winixd/functions/ls.cpp | 2 +- winixd/functions/upload.cpp | 2 +- winixd/plugins/export/exportinfo.cpp | 2 +- winixd/plugins/export/funexport.cpp | 2 +- winixd/plugins/gallery/gallery.cpp | 2 +- winixd/plugins/menu/templates.cpp | 2 +- winixd/plugins/thread/funthread.cpp | 2 +- winixd/plugins/thread/showthreads.cpp | 2 +- winixd/plugins/ticket/showtickets.cpp | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/winixd/functions/imgcrop.cpp b/winixd/functions/imgcrop.cpp index da6f75d..2bbde6b 100644 --- a/winixd/functions/imgcrop.cpp +++ b/winixd/functions/imgcrop.cpp @@ -61,6 +61,7 @@ bool ImgCrop::HasAccess() } + void ImgCrop::GetDirContent() { // iq.sel_type = Item::file; @@ -76,7 +77,7 @@ void ImgCrop::GetDirContent() where(). eq(L"type", static_cast(Item::file)). eq(L"parent_id", cur->request->dir_tab.back()->id). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE). + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_IMAGE). get_vector(); //db->GetItems(cur->request->item_tab, iq); diff --git a/winixd/functions/ls.cpp b/winixd/functions/ls.cpp index 5845b2a..9a7921e 100644 --- a/winixd/functions/ls.cpp +++ b/winixd/functions/ls.cpp @@ -80,7 +80,7 @@ void Ls::MakeGet() { //iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE); //db->GetItems(cur->request->item_tab, iq); - finder.eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE); + finder.eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_IMAGE); } // else // { diff --git a/winixd/functions/upload.cpp b/winixd/functions/upload.cpp index bd86539..8a68672 100644 --- a/winixd/functions/upload.cpp +++ b/winixd/functions/upload.cpp @@ -362,7 +362,7 @@ void Upload::MakeGet() where(). eq(L"parent_id", cur->request->dir_tab.back()->id). eq(L"type", static_cast(Item::file)). - neq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE). + neq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE). get_vector(cur->request->item_tab); //db->GetItems(cur->request->item_tab, query); diff --git a/winixd/plugins/export/exportinfo.cpp b/winixd/plugins/export/exportinfo.cpp index 00a660f..86f7158 100644 --- a/winixd/plugins/export/exportinfo.cpp +++ b/winixd/plugins/export/exportinfo.cpp @@ -315,7 +315,7 @@ void ExportInfo::SendAllFilesFromDir(long dir_id) where(). eq(L"parent_id", dir_id). eq(L"type", static_cast(Item::file)). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE). + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE). get_vector(dir_items); //db->GetItems(dir_items, iq_dir); diff --git a/winixd/plugins/export/funexport.cpp b/winixd/plugins/export/funexport.cpp index 041a310..a15901a 100644 --- a/winixd/plugins/export/funexport.cpp +++ b/winixd/plugins/export/funexport.cpp @@ -105,7 +105,7 @@ void FunExport::ExportDir(const Item & dir, bool static_files_too) if( !static_files_too ) { //iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); - finder.eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE); + finder.eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE); } finder.get_vector(dir_items); diff --git a/winixd/plugins/gallery/gallery.cpp b/winixd/plugins/gallery/gallery.cpp index d075518..af6cf52 100644 --- a/winixd/plugins/gallery/gallery.cpp +++ b/winixd/plugins/gallery/gallery.cpp @@ -98,7 +98,7 @@ void Gallery::MakeGetDir() select(). where(). eq(L"parent_id", cur->request->dir_tab.back()->id). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE). + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_IMAGE). get_vector(gallery_info->item_tab); //db->GetItems(gallery_info->item_tab, iq); diff --git a/winixd/plugins/menu/templates.cpp b/winixd/plugins/menu/templates.cpp index 178ab9f..063aefc 100644 --- a/winixd/plugins/menu/templates.cpp +++ b/winixd/plugins/menu/templates.cpp @@ -130,7 +130,7 @@ void read_from_db(long dir_id, int param, bool with_meta) finder. eq(L"type", static_cast(Item::file)). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE); + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_IMAGE); } else if( param == WINIX_PL_MENU_PARAM_DIRS ) diff --git a/winixd/plugins/thread/funthread.cpp b/winixd/plugins/thread/funthread.cpp index 41e7df5..04d19cf 100644 --- a/winixd/plugins/thread/funthread.cpp +++ b/winixd/plugins/thread/funthread.cpp @@ -99,7 +99,7 @@ void FunThread::PrepareThread(long file_id) where(). in(L"id", id_tab). eq(L"type", static_cast(Item::file)). - eq(L"content.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") ) diff --git a/winixd/plugins/thread/showthreads.cpp b/winixd/plugins/thread/showthreads.cpp index 0e5d473..6d066cb 100644 --- a/winixd/plugins/thread/showthreads.cpp +++ b/winixd/plugins/thread/showthreads.cpp @@ -120,7 +120,7 @@ void ShowThreads::ReadFiles() where(). eq(L"parent_id", cur->request->dir_tab.back()->id). eq(L"type", static_cast(Item::file)). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE). + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE). get_vector(); //db->GetItems(thread_info->item_tab, iq); diff --git a/winixd/plugins/ticket/showtickets.cpp b/winixd/plugins/ticket/showtickets.cpp index 5bdfc56..8218b7b 100644 --- a/winixd/plugins/ticket/showtickets.cpp +++ b/winixd/plugins/ticket/showtickets.cpp @@ -122,7 +122,7 @@ void ShowTickets::ReadFiles(long dir_id) where(). eq(L"parent_id", dir_id). eq(L"type", static_cast(Item::file)). - eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE). + eq(L"content", L"file_type", WINIX_ITEM_FILETYPE_NONE). get_vector(ticket_info->item_tab); //db->GetItems(ticket_info->item_tab, iq);