Item class has been moved to a new directory 'models', a new class has been added: ItemContent

and same fields from Item were moved to ItemContent

Item
- id
- parent_id
- type (file, dir, symlink)
- url
- subject
- template (html template)
- sort_index
- content_id

ItemContent
- id
- ref -> references (renamed)
- user_id
- modification_user_id
- group_id
- privileges
- date_creation
- date_modification
- guest_name
- link_to
- link_redirect
- file_path
- file_fs
- file_type
- file_size
- has_thumb -> file_has_thumb (renamed)
- hash -> file_hash (renamed)
- hash_type -> file_hash_type (renamed)
- content -> content_raw (renamed)
- content_type -> content_raw_type (renamed)
- content_parsed
- content_parsed_type
- meta
- ameta -> meta_admin (renamed)
- modify_index (removed)

WIP: #4
This commit is contained in:
2021-02-24 01:19:47 +01:00
parent 3d7ece15f8
commit 32e93a04c5
118 changed files with 5795 additions and 4514 deletions

View File

@@ -1,20 +1,18 @@
# DO NOT DELETE
gallery.o: gallery.h ../../../../winix/winixd/functions/functionbase.h
gallery.o: ../../../../winix/winixd/core/item.h
gallery.o: ../../../../pikotools/space/space.h
gallery.o: ../../../../pikotools/textstream/types.h
gallery.o: ../../../../pikotools/date/date.h
gallery.o: ../../../../pikotools/convert/inttostr.h
gallery.o: ../../../../winix/winixd/db/db.h
gallery.o: ../../../../winix/winixd/db/dbbase.h
gallery.o: ../../../../winix/winixd/db/dbconn.h
gallery.o: ../../../../winix/winixd/db/dbtextstream.h
gallery.o: ../../../../winix/winixd/core/textstream.h
gallery.o: ../../../../winix/winixd/core/misc.h
gallery.o: ../../../../winix/winixd/core/item.h
gallery.o: ../../../../winix/winixd/core/requesttypes.h
gallery.o: ../../../../pikotools/textstream/textstream.h
gallery.o: ../../../../pikotools/space/space.h
gallery.o: ../../../../pikotools/textstream/types.h
gallery.o: ../../../../pikotools/date/date.h
gallery.o: ../../../../pikotools/convert/inttostr.h
gallery.o: ../../../../pikotools/membuffer/membuffer.h
gallery.o: ../../../../pikotools/textstream/types.h
gallery.o: ../../../../pikotools/utf8/utf8.h
@@ -44,6 +42,20 @@ gallery.o: ../../../../winix/winixd/core/user.h
gallery.o: ../../../../winix/winixd/core/group.h
gallery.o: ../../../../winix/winixd/core/dircontainer.h
gallery.o: ../../../../winix/winixd/core/winixbase.h
gallery.o: ../../../../winix/winixd/models/item.h
gallery.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
gallery.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
gallery.o: ../../../../morm/src/queryresult.h
gallery.o: ../../../../morm/src/flatconnector.h
gallery.o: ../../../../morm/src/dbexpression.h
gallery.o: ../../../../morm/src/baseexpression.h
gallery.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
gallery.o: ../../../../morm/src/modeldata.h
gallery.o: ../../../../morm/src/cursorhelper.h
gallery.o: ../../../../morm/src/finderhelper.h
gallery.o: ../../../../morm/src/fieldvaluehelper.h
gallery.o: ../../../../morm/src/flatexpression.h
gallery.o: ../../../../winix/winixd/models/itemcontent.h
gallery.o: ../../../../winix/winixd/core/ugcontainer.h
gallery.o: ../../../../winix/winixd/core/request.h
gallery.o: ../../../../winix/winixd/core/error.h
@@ -59,19 +71,8 @@ gallery.o: ../../../../winix/winixd/core/winixmodel.h
gallery.o: ../../../../winix/winixd/core/plugin.h
gallery.o: ../../../../winix/winixd/core/pluginmsg.h
gallery.o: ../../../../winix/winixd/core/plugindata.h
gallery.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
gallery.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
gallery.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
gallery.o: ../../../../morm/src/queryresult.h
gallery.o: ../../../../morm/src/flatconnector.h
gallery.o: ../../../../morm/src/dbexpression.h
gallery.o: ../../../../morm/src/baseexpression.h
gallery.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
gallery.o: ../../../../morm/src/cursorhelper.h
gallery.o: ../../../../morm/src/finderhelper.h
gallery.o: ../../../../morm/src/fieldvaluehelper.h
gallery.o: ../../../../morm/src/flatexpression.h
gallery.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
gallery.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
gallery.o: ../../../../morm/src/cursor.h
gallery.o: ../../../../morm/src/jsonexpression.h
gallery.o: ../../../../morm/src/postgresqlexpression.h
gallery.o: ../../../../morm/src/jsonconnector.h
@@ -106,9 +107,10 @@ gallery.o: ../../../../winix/winixd/templates/patterns.h
gallery.o: ../../../../winix/winixd/templates/locale.h
gallery.o: ../../../../winix/winixd/templates/localefilter.h
gallery.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
gallery.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
gallery.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
gallery.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
gallery.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
gallery.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
gallery.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
gallery.o: ../../../../ezc/src/pattern.h
gallery.o: ../../../../ezc/src/expressionparser.h
gallery.o: ../../../../ezc/src/patternparser.h
gallery.o: ../../../../winix/winixd/notify/notifythread.h
@@ -128,25 +130,44 @@ gallery.o: ../../../../winix/winixd/core/system.h
gallery.o: ../../../../winix/winixd/core/sessionidmanager.h
gallery.o: ../../../../tito/src/base64.h ../../../../tito/src/aes.h
gallery.o: ../../../../winix/winixd/core/slog.h galleryinfo.h
galleryinfo.o: galleryinfo.h ../../../../winix/winixd/core/item.h
galleryinfo.o: galleryinfo.h ../../../../winix/winixd/models/item.h
galleryinfo.o: ../../../../morm/src/model.h
galleryinfo.o: ../../../../pikotools/textstream/textstream.h
galleryinfo.o: ../../../../pikotools/space/space.h
galleryinfo.o: ../../../../pikotools/textstream/types.h
galleryinfo.o: ../../../../pikotools/date/date.h
galleryinfo.o: ../../../../pikotools/convert/inttostr.h
galleryinfo.o: ../../../../pikotools/membuffer/membuffer.h
galleryinfo.o: ../../../../pikotools/textstream/types.h
galleryinfo.o: ../../../../morm/src/modelconnector.h
galleryinfo.o: ../../../../morm/src/clearer.h
galleryinfo.o: ../../../../morm/src/dbconnector.h
galleryinfo.o: ../../../../pikotools/log/log.h
galleryinfo.o: ../../../../pikotools/log/filelog.h
galleryinfo.o: ../../../../morm/src/queryresult.h
galleryinfo.o: ../../../../morm/src/flatconnector.h
galleryinfo.o: ../../../../morm/src/dbexpression.h
galleryinfo.o: ../../../../morm/src/baseexpression.h
galleryinfo.o: ../../../../morm/src/morm_types.h
galleryinfo.o: ../../../../morm/src/modelenv.h
galleryinfo.o: ../../../../morm/src/modeldata.h
galleryinfo.o: ../../../../morm/src/cursorhelper.h
galleryinfo.o: ../../../../morm/src/finderhelper.h
galleryinfo.o: ../../../../morm/src/fieldvaluehelper.h
galleryinfo.o: ../../../../morm/src/flatexpression.h
galleryinfo.o: ../../../../winix/winixd/models/itemcontent.h
init.o: gallery.h ../../../../winix/winixd/functions/functionbase.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../winix/winixd/core/misc.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.h
@@ -175,6 +196,18 @@ init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
init.o: ../../../../morm/src/dbconnector.h ../../../../morm/src/queryresult.h
init.o: ../../../../morm/src/flatconnector.h
init.o: ../../../../morm/src/dbexpression.h
init.o: ../../../../morm/src/baseexpression.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
init.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
init.o: ../../../../morm/src/finderhelper.h
init.o: ../../../../morm/src/fieldvaluehelper.h
init.o: ../../../../morm/src/flatexpression.h
init.o: ../../../../winix/winixd/models/itemcontent.h
init.o: ../../../../winix/winixd/core/ugcontainer.h
init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.h
@@ -190,17 +223,7 @@ init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
init.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
init.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
init.o: ../../../../morm/src/queryresult.h
init.o: ../../../../morm/src/flatconnector.h
init.o: ../../../../morm/src/dbexpression.h
init.o: ../../../../morm/src/baseexpression.h ../../../../morm/src/modelenv.h
init.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
init.o: ../../../../morm/src/finderhelper.h
init.o: ../../../../morm/src/fieldvaluehelper.h
init.o: ../../../../morm/src/flatexpression.h ../../../../morm/src/finder.h
init.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
init.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h
@@ -235,10 +258,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
init.o: ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h
@@ -304,20 +327,18 @@ init.o: ../../../../winix/winixd/functions/who.h
init.o: ../../../../winix/winixd/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h
templates.o: gallery.h ../../../../winix/winixd/functions/functionbase.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../winix/winixd/db/db.h
templates.o: ../../../../winix/winixd/db/dbbase.h
templates.o: ../../../../winix/winixd/db/dbconn.h
templates.o: ../../../../winix/winixd/db/dbtextstream.h
templates.o: ../../../../winix/winixd/core/textstream.h
templates.o: ../../../../winix/winixd/core/misc.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/core/requesttypes.h
templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../pikotools/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/utf8/utf8.h
@@ -347,6 +368,22 @@ templates.o: ../../../../winix/winixd/core/user.h
templates.o: ../../../../winix/winixd/core/group.h
templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/models/item.h
templates.o: ../../../../morm/src/model.h
templates.o: ../../../../morm/src/modelconnector.h
templates.o: ../../../../morm/src/clearer.h
templates.o: ../../../../morm/src/dbconnector.h
templates.o: ../../../../morm/src/queryresult.h
templates.o: ../../../../morm/src/flatconnector.h
templates.o: ../../../../morm/src/dbexpression.h
templates.o: ../../../../morm/src/baseexpression.h
templates.o: ../../../../morm/src/morm_types.h
templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
templates.o: ../../../../morm/src/cursorhelper.h
templates.o: ../../../../morm/src/finderhelper.h
templates.o: ../../../../morm/src/fieldvaluehelper.h
templates.o: ../../../../morm/src/flatexpression.h
templates.o: ../../../../winix/winixd/models/itemcontent.h
templates.o: ../../../../winix/winixd/core/ugcontainer.h
templates.o: ../../../../winix/winixd/core/request.h
templates.o: ../../../../winix/winixd/core/error.h
@@ -362,21 +399,8 @@ templates.o: ../../../../winix/winixd/core/winixmodel.h
templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
templates.o: ../../../../morm/src/model.h
templates.o: ../../../../morm/src/modelconnector.h
templates.o: ../../../../morm/src/clearer.h
templates.o: ../../../../morm/src/dbconnector.h
templates.o: ../../../../morm/src/queryresult.h
templates.o: ../../../../morm/src/flatconnector.h
templates.o: ../../../../morm/src/dbexpression.h
templates.o: ../../../../morm/src/baseexpression.h
templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
templates.o: ../../../../morm/src/cursorhelper.h
templates.o: ../../../../morm/src/finderhelper.h
templates.o: ../../../../morm/src/fieldvaluehelper.h
templates.o: ../../../../morm/src/flatexpression.h
templates.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
templates.o: ../../../../morm/src/cursor.h
templates.o: ../../../../morm/src/jsonexpression.h
templates.o: ../../../../morm/src/postgresqlexpression.h
templates.o: ../../../../morm/src/jsonconnector.h
@@ -411,9 +435,10 @@ templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/locale.h
templates.o: ../../../../winix/winixd/templates/localefilter.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h
templates.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h
templates.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h
templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
templates.o: ../../../../ezc/src/pattern.h
templates.o: ../../../../ezc/src/expressionparser.h
templates.o: ../../../../ezc/src/patternparser.h
templates.o: ../../../../winix/winixd/notify/notifythread.h

View File

@@ -80,19 +80,28 @@ void Gallery::SortPointers()
void Gallery::MakeGetDir()
{
iq.SetAll(false, false);
iq.sel_parent_id = true;
iq.sel_subject = true;
iq.sel_url = true;
iq.sel_type = true;
iq.sel_file = true;
iq.sel_sort_index = true;
iq.sel_meta = true;
// iq.SetAll(false, false);
// iq.sel_parent_id = true;
// iq.sel_subject = true;
// iq.sel_url = true;
// iq.sel_type = true;
// iq.sel_file = true;
// iq.sel_sort_index = true;
// iq.sel_meta = true;
//
// iq.WhereParentId(cur->request->dir_tab.back()->id);
// iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
iq.WhereParentId(cur->request->dir_tab.back()->id);
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
morm::Finder<Item> finder(model_connector);
db->GetItems(gallery_info->item_tab, iq);
finder.
select().
where().
eq(L"parent_id", cur->request->dir_tab.back()->id).
eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE).
get_vector(gallery_info->item_tab);
//db->GetItems(gallery_info->item_tab, iq);
CreatePointers();
}

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@ public:
private:
GalleryInfo * gallery_info;
DbItemQuery iq;
//DbItemQuery iq;
void CreatePointers();
void SortPointers();

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
#define headerfile_winix_plugins_gallery_galleryinfo
#include <vector>
#include "core/item.h"
#include "models/item.h"
namespace Winix
{

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2016, Tomasz Sowa
* Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -121,7 +121,7 @@ void gallery_tab_meta_str(Info & i)
if( gallery_index < gallery_info.item_sort_tab.size() )
{
Item & item = *gallery_info.item_sort_tab[gallery_index];
item.meta.Serialize(i.out, true, false);
item.item_content.meta.Serialize(i.out, true, false);
}
}
@@ -131,7 +131,7 @@ void gallery_tab_meta(Info & i)
if( gallery_index < gallery_info.item_sort_tab.size() )
{
Item & item = *gallery_info.item_sort_tab[gallery_index];
space_value(i, item.meta);
space_value(i, item.item_content.meta);
}
}
@@ -141,7 +141,7 @@ void gallery_tab_meta_tab(Info & i)
if( gallery_index < gallery_info.item_sort_tab.size() )
{
Item & item = *gallery_info.item_sort_tab[gallery_index];
space_list_tab(i, item.meta);
space_list_tab(i, item.item_content.meta);
}
}
@@ -151,7 +151,7 @@ void gallery_tab_meta_tab_value(Info & i)
if( gallery_index < gallery_info.item_sort_tab.size() )
{
Item & item = *gallery_info.item_sort_tab[gallery_index];
space_list_tab_value(i, item.meta, L"gallery_tab_meta_tab");
space_list_tab_value(i, item.item_content.meta, L"gallery_tab_meta_tab");
}
}
@@ -161,7 +161,7 @@ void gallery_tab_meta_tab_has_next(Info & i)
if( gallery_index < gallery_info.item_sort_tab.size() )
{
Item & item = *gallery_info.item_sort_tab[gallery_index];
space_list_tab_has_next(i, item.meta, L"gallery_tab_meta_tab");
space_list_tab_has_next(i, item.item_content.meta, L"gallery_tab_meta_tab");
}
}