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:
Tomasz Sowa 2021-02-24 01:19:47 +01:00
parent 3d7ece15f8
commit 32e93a04c5
118 changed files with 5795 additions and 4514 deletions

View File

@ -61,6 +61,7 @@ all: winix.so plugins winix
winix.so: $(winix.src.files) winix.so: $(winix.src.files)
@cd core ; $(MAKE) -e @cd core ; $(MAKE) -e
@cd models ; $(MAKE) -e
@cd db ; $(MAKE) -e @cd db ; $(MAKE) -e
@cd functions ; $(MAKE) -e @cd functions ; $(MAKE) -e
@cd notify ; $(MAKE) -e @cd notify ; $(MAKE) -e
@ -69,7 +70,7 @@ winix.so: $(winix.src.files)
@cd $(GLOBAL_WORKING_DIR)/tito/src ; $(MAKE) -e @cd $(GLOBAL_WORKING_DIR)/tito/src ; $(MAKE) -e
@cd $(GLOBAL_WORKING_DIR)/pikotools ; $(MAKE) -e @cd $(GLOBAL_WORKING_DIR)/pikotools ; $(MAKE) -e
@cd $(GLOBAL_WORKING_DIR)/morm/src ; $(MAKE) -e @cd $(GLOBAL_WORKING_DIR)/morm/src ; $(MAKE) -e
$(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) $(winix_include_paths) core/*.o db/*.o functions/*.o templates/*.o notify/*.o $(GLOBAL_WORKING_DIR)/ezc/src/ezc.a $(GLOBAL_WORKING_DIR)/tito/src/tito.a $(GLOBAL_WORKING_DIR)/pikotools/convert/convert.a $(GLOBAL_WORKING_DIR)/pikotools/utf8/utf8.a $(GLOBAL_WORKING_DIR)/pikotools/space/space.a $(GLOBAL_WORKING_DIR)/pikotools/mainparser/mainparser.a $(GLOBAL_WORKING_DIR)/pikotools/date/date.a $(GLOBAL_WORKING_DIR)/pikotools/log/log.a $(GLOBAL_WORKING_DIR)/morm/src/morm.a $(LDFLAGS) -lfcgi -lpq -lz -lpthread -lcurl -Wl,-no-whole-archive $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) $(winix_include_paths) core/*.o db/*.o models/*.o functions/*.o templates/*.o notify/*.o $(GLOBAL_WORKING_DIR)/ezc/src/ezc.a $(GLOBAL_WORKING_DIR)/tito/src/tito.a $(GLOBAL_WORKING_DIR)/pikotools/convert/convert.a $(GLOBAL_WORKING_DIR)/pikotools/utf8/utf8.a $(GLOBAL_WORKING_DIR)/pikotools/space/space.a $(GLOBAL_WORKING_DIR)/pikotools/mainparser/mainparser.a $(GLOBAL_WORKING_DIR)/pikotools/date/date.a $(GLOBAL_WORKING_DIR)/pikotools/log/log.a $(GLOBAL_WORKING_DIR)/morm/src/morm.a $(LDFLAGS) -lfcgi -lpq -lz -lpthread -lcurl -Wl,-no-whole-archive
winix: winix.so $(winix.src.files) winix: winix.so $(winix.src.files)
@ -96,6 +97,7 @@ FORCE:
clean: clean:
@cd core ; $(MAKE) -e clean @cd core ; $(MAKE) -e clean
@cd db ; $(MAKE) -e clean @cd db ; $(MAKE) -e clean
@cd models ; $(MAKE) -e clean
@cd functions ; $(MAKE) -e clean @cd functions ; $(MAKE) -e clean
@cd templates ; $(MAKE) -e clean @cd templates ; $(MAKE) -e clean
@cd notify ; $(MAKE) -e clean @cd notify ; $(MAKE) -e clean
@ -123,6 +125,7 @@ clean:
depend: depend:
@cd core ; $(MAKE) -e depend @cd core ; $(MAKE) -e depend
@cd db ; $(MAKE) -e depend @cd db ; $(MAKE) -e depend
@cd models ; $(MAKE) -e depend
@cd functions ; $(MAKE) -e depend @cd functions ; $(MAKE) -e depend
@cd templates ; $(MAKE) -e depend @cd templates ; $(MAKE) -e depend
@cd notify ; $(MAKE) -e depend @cd notify ; $(MAKE) -e depend

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o crypt.o dircontainer.o dirs.o filelog.o groups.o htmlfilter.o httpsimpleparser.o image.o ipbancontainer.o item.o job.o lastcontainer.o loadavg.o lock.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionidmanager.o sessionmanager.o sessionparser.o slog.o synchro.o system.o threadmanager.o timezone.o timezones.o user.o users.o winixbase.o winixmodel.o winixrequest.o winixsystem.o o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o crypt.o dircontainer.o dirs.o filelog.o groups.o htmlfilter.o httpsimpleparser.o image.o ipbancontainer.o job.o lastcontainer.o loadavg.o lock.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionidmanager.o sessionmanager.o sessionparser.o slog.o synchro.o system.o threadmanager.o timezone.o timezones.o user.o users.o winixbase.o winixmodel.o winixrequest.o winixsystem.o

View File

@ -284,6 +284,14 @@ bool App::Init()
model_connector.set_db_connector(postgresql_connector); model_connector.set_db_connector(postgresql_connector);
//model_connector.set_doc_connector(doc_html_connector); //model_connector.set_doc_connector(doc_html_connector);
// temporary
Item item_temp;
item_temp.set_connector(model_connector);
item_temp.do_migration(&model_connector);
//std::exit(0);
// -----------
db_conn.SetConnParam(config.db_database, config.db_user, config.db_pass); db_conn.SetConnParam(config.db_database, config.db_user, config.db_pass);
db_conn.WaitForConnection(); db_conn.WaitForConnection();
db.PostgreSQLsmallerThan10(config.db_postgresql_smaller_than_10); db.PostgreSQLsmallerThan10(config.db_postgresql_smaller_than_10);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -37,8 +37,8 @@
#include <list> #include <list>
#include <map> #include <map>
#include "item.h"
#include "winixbase.h" #include "winixbase.h"
#include "models/item.h"
namespace Winix namespace Winix

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -76,7 +76,7 @@ void Dirs::Clear()
bool Dirs::HasReadExecAccessForRoot(const Item & item) bool Dirs::HasReadExecAccessForRoot(const Item & item)
{ {
// there must be at least one 'x' (for the root) // there must be at least one 'x' (for the root)
return (item.privileges & 01111) != 0; return (item.item_content.privileges & 01111) != 0;
} }
@ -88,28 +88,33 @@ void Dirs::CheckRootDir()
{ {
if( !HasReadExecAccessForRoot(*i) ) if( !HasReadExecAccessForRoot(*i) )
{ {
i->privileges = 07555; i->item_content.privileges = 07555;
log << log1 << "Dirs: there is no access for a root (admin) to the root dir, setting 07555 for the root directory" << logend; log << log1 << "Dirs: there is no access for a root (admin) to the root dir, setting 07555 for the root directory" << logend;
db->EditPrivById(*i, i->id); i->update(false, false);
//db->EditPrivById(*i, i->id);
} }
return; return;
} }
log << log1 << "Dirs: there is no a root directory in the database (creating one)" << logend; log << log1 << "Dirs: there is no a root directory in the database (creating one)" << logend;
Item root; Item root;
root.set_connector(model_connector);
root.type = Item::dir; root.type = Item::dir;
root.parent_id = -1; root.parent_id = -1;
root.user_id = -1; root.item_content.user_id = -1;
root.group_id = -1; root.item_content.group_id = -1;
root.privileges = 07555; root.item_content.privileges = 07555;
// !! upewnic sie ze baza nie zmieni url (gdyby wczesniej juz byl w bazie pusty url) // !! upewnic sie ze baza nie zmieni url (gdyby wczesniej juz byl w bazie pusty url)
// !! zrobic jakis wyjatek do wprowadzania roota? // !! zrobic jakis wyjatek do wprowadzania roota?
if( db->AddItem(root) == WINIX_ERR_OK ) // if( db->AddItem(root) == WINIX_ERR_OK )
// {
// dir_tab.PushBack(root);
// }
if( root.insert() )
{ {
dir_tab.PushBack(root); dir_tab.PushBack(root);
} }
@ -122,7 +127,15 @@ void Dirs::ReadDirs()
{ {
Clear(); Clear();
db->GetDirs(dir_tab); //db->GetDirs(dir_tab);
morm::Finder<Item> finder(model_connector);
std::list<Item> all_dirs = finder.select().where().eq(L"type", static_cast<int>(Item::Type::dir)).get_list();
for(Item & item : all_dirs)
{
dir_tab.PushBack(item);
}
CheckRootDir(); CheckRootDir();
dir_tab.FindSpecialFolders(); dir_tab.FindSpecialFolders();
} }
@ -723,7 +736,7 @@ bool Dirs::DelDir(long dir_id)
} }
Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir, int notify_code) bool Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir, int notify_code)
{ {
if( pdir ) if( pdir )
*pdir = 0; *pdir = 0;
@ -731,9 +744,11 @@ Error Dirs::AddDirectory(Item & item, bool add_to_dir_tab, Item ** pdir, int not
if( item.type != Item::dir ) if( item.type != Item::dir )
return WINIX_ERR_DIR_EXPECTED; return WINIX_ERR_DIR_EXPECTED;
Error status = db->AddItem(item); //Error status = db->AddItem(item);
//item.set_connector(model_connector);
bool status = item.insert();
if( status == WINIX_ERR_OK ) if( status )
{ {
Item * d = AddDir(item); Item * d = AddDir(item);
@ -764,10 +779,11 @@ Item * Dirs::CreateVarDir()
if( root ) if( root )
{ {
v.set_connector(root->get_connector());
v.parent_id = root->id; v.parent_id = root->id;
v.user_id = root->user_id; v.item_content.user_id = root->item_content.user_id;
v.group_id = root->group_id; v.item_content.group_id = root->item_content.group_id;
v.privileges = root->privileges; v.item_content.privileges = root->item_content.privileges;
v.subject = L"var"; v.subject = L"var";
v.url = L"var"; v.url = L"var";
v.type = Item::dir; v.type = Item::dir;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,12 +39,11 @@
#include <vector> #include <vector>
#include <map> #include <map>
#include <string> #include <string>
#include "item.h"
#include "dircontainer.h" #include "dircontainer.h"
#include "db/db.h" #include "db/db.h"
#include "request.h" #include "request.h"
#include "winixmodel.h" #include "winixmodel.h"
#include "models/item.h"
@ -115,7 +114,7 @@ public:
Item * CreateVarDir(); Item * CreateVarDir();
// !! jak juz wczesniejsze nazwy beda zmienione to tutaj damy AddDir() /AddDir() juz istnieje przeciez?/ // !! jak juz wczesniejsze nazwy beda zmienione to tutaj damy AddDir() /AddDir() juz istnieje przeciez?/
Error AddDirectory(Item & item, bool add_to_dir_tab = false, Item ** pdir = 0, int notify_code = 0); bool AddDirectory(Item & item, bool add_to_dir_tab = false, Item ** pdir = 0, int notify_code = 0);
// returns how many levels of directories there are // returns how many levels of directories there are
// "/" -> 0 (root dir) // "/" -> 0 (root dir)

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -377,7 +377,7 @@ bool Image::CreateInputFileName()
{ {
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB); bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB);
if( thumb && !file_work.has_thumb ) if( thumb && !file_work.item_content.file_has_thumb )
{ {
log << log1 << "Image: file id: " << file_work.id << ", url: " << file_work.url log << log1 << "Image: file id: " << file_work.id << ", url: " << file_work.url
<< " doesn't have a thumbnail yet (skipping)" << logend; << " doesn't have a thumbnail yet (skipping)" << logend;
@ -414,11 +414,19 @@ bool Image::CreateCommand()
{ {
class Lock lock_object(synchro); class Lock lock_object(synchro);
iq.SetAll(true, false); // iq.SetAll(true, false);
iq.WhereId(item_work.file_id); // iq.WhereId(item_work.file_id);
morm::Finder<Item> finder(model_connector);
{
// IMPROVEME we need a seperate model_connector for this thread
Lock();
file_work = finder.select().where().eq(L"id", item_work.file_id).get();
}
// the file could have been changed especially when there is a long queue of files // the file could have been changed especially when there is a long queue of files
if( db->GetItem(file_work, iq) != WINIX_ERR_OK ) if( !file_work.found() )
return false; return false;
if( !CreateInputFileName() ) if( !CreateInputFileName() )
@ -483,10 +491,16 @@ void Image::ImageSavedCorrectly()
{ {
if( item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB ) if( item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB )
{ {
if( !file_work.has_thumb ) if( !file_work.item_content.file_has_thumb )
{ {
file_work.has_thumb = true; file_work.item_content.file_has_thumb = true;
db->EditHasThumbById(true, file_work.id);
{
// IMPROVEME we need a separate model_connector for this thread
Lock();
file_work.update(false, false);
//db->EditHasThumbById(true, file_work.id);
}
} }
log << log3 << "Image: generated a thumbnail: " << dst_path << logend; log << log3 << "Image: generated a thumbnail: " << dst_path << logend;
@ -528,11 +542,23 @@ void Image::SaveImage()
class Lock lock_object(synchro); class Lock lock_object(synchro);
// the file could have been changed especially when creating the image lasted too long // the file could have been changed especially when creating the image lasted too long
iq.SetAll(true, false); //iq.SetAll(true, false);
iq.WhereId(item_work.file_id); //iq.WhereId(item_work.file_id);
morm::Finder<Item> finder(model_connector);
if( db->GetItem(file_work, iq) == WINIX_ERR_OK )
{ {
// IMPROVEME we need a seperate model_connector for this thread
Lock();
file_work = finder.select().where().eq(L"id", item_work.file_id).get();
}
// the file could have been changed especially when there is a long queue of files
if( !file_work.found() )
return;
//if( db->GetItem(file_work, iq) == WINIX_ERR_OK )
//{
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB || bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB ||
item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB || item_work.type == WINIX_IMAGE_TYPE_CROP_THUMB ||
item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB ); item_work.type == WINIX_IMAGE_TYPE_CREATE_CROP_NEW_THUMB );
@ -558,7 +584,7 @@ void Image::SaveImage()
{ {
log << log1 << "Image: cannot create a destination path" << logend; log << log1 << "Image: cannot create a destination path" << logend;
} }
} //}
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -40,8 +40,8 @@
#include "basethread.h" #include "basethread.h"
#include "textstream.h" #include "textstream.h"
#include "db/db.h" #include "db/db.h"
#include "core/item.h"
#include "core/config.h" #include "core/config.h"
#include "models/item.h"
namespace Winix namespace Winix
@ -187,7 +187,6 @@ private:
std::wstring src_path, dst_path; std::wstring src_path, dst_path;
TextStream<std::string> command; TextStream<std::string> command;
TextStream<std::wstring> stream_tmp_path; TextStream<std::wstring> stream_tmp_path;
DbItemQuery iq;
std::string add_tempa; std::string add_tempa;
std::string input_file_name; std::string input_file_name;
std::string tmp_file_name; std::string tmp_file_name;

View File

@ -1,156 +0,0 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2016, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_core_item
#define headerfile_winix_core_item
#include <string>
#include "space/space.h"
#include "date/date.h"
namespace Winix
{
#define WINIX_ITEM_FILETYPE_NONE 0
#define WINIX_ITEM_FILETYPE_IMAGE 1
#define WINIX_ITEM_FILETYPE_DOCUMENT 2
#define WINIX_ITEM_FILETYPE_VIDEO 3
#define WINIX_ITEM_FILETYPE_UNKNOWN 10
struct Item
{
long id;
long parent_id;
long user_id;
long group_id;
std::wstring guest_name; // used as a user name when user_id is equal -1
long modification_user_id; // who has modified the item last (not taken into account when checking permissions)
int privileges;
PT::Date date_creation;
PT::Date date_modification;
std::wstring subject;
std::wstring content;
std::wstring url;
int modify_index;
enum ContentType
{
ct_text = 0,
ct_formatted_text,
ct_html,
ct_bbcode,
ct_other, // no auto-formatting is applied
};
ContentType content_type;
enum Type
{
dir = 0,
file = 1,
symlink = 2,
none = 1000
};
Type type;
// used when type is symlink or to a directory too (function 'default')
std::wstring link_to;
int link_redirect; // !! IMPROVE ME should it be 'bool'?
// static file (if exists)
std::wstring file_path; // relative file path
int file_fs; // file system type where the file was saved
int file_type; // file type (none, image, doc, etc)
bool has_thumb; // whether or not we have a thumbnail
std::wstring hash; // file hash (md4, md5, ...)
int hash_type; // hash type WINIX_CRYPT_HASH_* (see crypt.h)
size_t file_size; // size of the file
std::wstring html_template;
// sort index used when displaying a group of items
int sort_index;
// meta information
PT::Space meta;
PT::Space ameta;
// methods
Item();
void SetDateToNow();
void SetDateModifyToNow();
void Clear();
static bool CanContentBeHtmlFiltered(Item::ContentType ct);
bool CanContentBeHtmlFiltered();
private:
// used by the database
long content_id; // content id in 'content' table
int ref; // content references
friend class Db;
friend struct DbItemColumns;
};
} // namespace Winix
#endif

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,7 +39,6 @@
#include <sstream> #include <sstream>
#include <ctime> #include <ctime>
#include <cstdio> #include <cstdio>
#include "item.h"
#include "requesttypes.h" #include "requesttypes.h"
#include "date/date.h" #include "date/date.h"
#include "textstream/textstream.h" #include "textstream/textstream.h"

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -40,11 +40,10 @@
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#include "mount.h" #include "mount.h"
#include "item.h"
#include "dirs.h" #include "dirs.h"
#include "winixmodel.h" #include "winixmodel.h"
#include "models/item.h"

View File

@ -233,7 +233,7 @@ void Mounts::ReadMounts(const std::wstring & mounts)
// reading from /etc/fstab // reading from /etc/fstab
Error Mounts::ReadMounts() void Mounts::ReadMounts()
{ {
static std::wstring file = L"fstab"; static std::wstring file = L"fstab";
@ -242,27 +242,27 @@ Error Mounts::ReadMounts()
if( !etc ) if( !etc )
{ {
log << log1 << "M: there is no /etc directory" << logend; log << log1 << "M: there is no /etc directory" << logend;
return WINIX_ERR_NO_ITEM; return;
} }
Item fstab; morm::Finder<Item> finder(model_connector);
Error err = db->GetItem(etc->id, file, fstab); Item fstab = finder.select().where().eq(L"parent_id", etc->id).eq(L"url", file).get();
if( err == WINIX_ERR_NO_ITEM ) // Error err = db->GetItem(etc->id, file, fstab);
if( !fstab.found() )
{ {
log << log1 << "M: there is no /etc/fstab file" << logend; log << log1 << "M: there is no /etc/fstab file" << logend;
return err; return;
} }
if( err != WINIX_ERR_OK ) // if( err != WINIX_ERR_OK )
{ // {
log << log1 << "M: cannot read /etc/fstab" << logend; // log << log1 << "M: cannot read /etc/fstab" << logend;
return err; // return err;
} // }
ReadMounts(fstab.content); ReadMounts(fstab.item_content.content_raw);
return WINIX_ERR_OK;
} }

View File

@ -124,7 +124,7 @@ public:
void CreateMounts(); void CreateMounts();
void ReadMounts(const std::wstring & mounts); void ReadMounts(const std::wstring & mounts);
Error ReadMounts(); void ReadMounts();
Mount * CalcCurMount(); Mount * CalcCurMount();
Mount * CalcMount(long dir_id); Mount * CalcMount(long dir_id);

View File

@ -69,6 +69,9 @@ void PluginInfo::set_dependency_for(WinixBase & winix_base)
void PluginInfo::set_dependency_for(WinixModel * winix_model) void PluginInfo::set_dependency_for(WinixModel * winix_model)
{ {
plugin->SetDependencyFor(winix_model); plugin->SetDependencyFor(winix_model);
//model_connector = winix_model->get_model_connector();
// CHECKME what about model_connector here?
} }
void PluginInfo::set_dependency_for(WinixModel & winix_model) void PluginInfo::set_dependency_for(WinixModel & winix_model)

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -41,7 +41,7 @@
#include "pluginmsg.h" #include "pluginmsg.h"
#include "plugindata.h" #include "plugindata.h"
#include "winixbase.h" #include "winixbase.h"
#include "modelconnector.h"
@ -81,6 +81,7 @@ struct Session;
// move me to a different file // move me to a different file
// may it should be based on WinixModel?
struct PluginInfo struct PluginInfo
{ {
// these variables are used for some purposes // these variables are used for some purposes
@ -108,6 +109,7 @@ struct PluginInfo
Plugin * plugin; Plugin * plugin;
morm::ModelConnector * model_connector;
// a session // a session
// some messages are sent in a session's context e.g. logging a user // some messages are sent in a session's context e.g. logging a user

View File

@ -39,7 +39,7 @@
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include "requesttypes.h" #include "requesttypes.h"
#include "item.h" #include "models/item.h"
#include "error.h" #include "error.h"
#include "config.h" #include "config.h"
#include "textstream.h" #include "textstream.h"

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,7 +39,6 @@
#include <string> #include <string>
#include <ctime> #include <ctime>
#include <map> #include <map>
#include "item.h"
#include "error.h" #include "error.h"
#include "user.h" #include "user.h"
#include "plugindata.h" #include "plugindata.h"

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -337,14 +337,23 @@ void System::RedirectTo(long item_id, const wchar_t * postfix, bool use_reqtype)
else else
{ {
// item_id is pointing to a file // item_id is pointing to a file
DbItemQuery iq; // DbItemQuery iq;
iq.SetAllSel(false); // iq.SetAllSel(false);
iq.WhereId(item_id); // iq.WhereId(item_id);
iq.sel_parent_id = true; // iq.sel_parent_id = true;
iq.sel_url = true; // iq.sel_url = true;
if( db->GetItem(item_temp, iq) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
item_temp = finder.
select().
where().
eq(L"id", item_id).
get();
//if( db->GetItem(item_temp, iq) == WINIX_ERR_OK )
if( item_temp.found() )
{ {
if( dirs.MakePath(item_temp.parent_id, cur->request->redirect_to, false) ) if( dirs.MakePath(item_temp.parent_id, cur->request->redirect_to, false) )
cur->request->redirect_to += item_temp.url; cur->request->redirect_to += item_temp.url;
@ -528,7 +537,7 @@ bool System::CanChangeUser(const Item & item, long new_user_id)
// super user is allowed everything // super user is allowed everything
return true; return true;
if( item.user_id == -1 || new_user_id == -1 || item.user_id != new_user_id ) if( item.item_content.user_id == -1 || new_user_id == -1 || item.item_content.user_id != new_user_id )
// only super user can change the owner of an item // only super user can change the owner of an item
return false; return false;
@ -548,7 +557,7 @@ bool System::CanChangeGroup(const Item & item, long new_group_id)
// super user is allowed everything // super user is allowed everything
return true; return true;
if( item.group_id != new_group_id ) if( item.item_content.group_id != new_group_id )
{ {
// user is allowed to change the group only if he is an owner of the item // user is allowed to change the group only if he is an owner of the item
// he can change only into a group in which he is a member of, or into a 'no_group' // he can change only into a group in which he is a member of, or into a 'no_group'
@ -556,7 +565,7 @@ bool System::CanChangeGroup(const Item & item, long new_group_id)
if( !cur->session->puser || cur->session->puser->id == -1 ) if( !cur->session->puser || cur->session->puser->id == -1 )
return false; return false;
if( item.user_id == -1 || cur->session->puser->id != item.user_id ) if( item.item_content.user_id == -1 || cur->session->puser->id != item.item_content.user_id )
return false; return false;
if( new_group_id == -1 ) if( new_group_id == -1 )
@ -582,14 +591,14 @@ bool System::CanChangePrivileges(const Item & item, int new_priv)
// super user is allowed everything // super user is allowed everything
return true; return true;
if( item.privileges != new_priv ) if( item.item_content.privileges != new_priv )
{ {
// the owner of an item is allowed to change the privileges // the owner of an item is allowed to change the privileges
if( !cur->session->puser || cur->session->puser->id == -1 ) if( !cur->session->puser || cur->session->puser->id == -1 )
return false; return false;
if( item.user_id == -1 || cur->session->puser->id != item.user_id ) if( item.item_content.user_id == -1 || cur->session->puser->id != item.item_content.user_id )
return false; return false;
} }
@ -608,27 +617,27 @@ bool System::HasAccess(const Item & item, int mask)
// super user is allowed everything // super user is allowed everything
return true; return true;
if( cur->session->puser && item.user_id != -1 && cur->session->puser->id == item.user_id ) if( cur->session->puser && item.item_content.user_id != -1 && cur->session->puser->id == item.item_content.user_id )
{ {
// the owner // the owner
return ((item.privileges >> 9) & mask) == mask; return ((item.item_content.privileges >> 9) & mask) == mask;
} }
if( cur->session->puser && item.group_id != -1 && cur->session->puser->IsMemberOf(item.group_id) ) if( cur->session->puser && item.item_content.group_id != -1 && cur->session->puser->IsMemberOf(item.item_content.group_id) )
{ {
// group // group
return ((item.privileges >> 6) & mask) == mask; return ((item.item_content.privileges >> 6) & mask) == mask;
} }
if( cur->session->puser ) if( cur->session->puser )
{ {
// others -- others logged people // others -- others logged people
return ((item.privileges >> 3) & mask) == mask; return ((item.item_content.privileges >> 3) & mask) == mask;
} }
// guests -- not logged people // guests -- not logged people
return (item.privileges & mask) == mask; return (item.item_content.privileges & mask) == mask;
} }
@ -656,7 +665,7 @@ bool System::HasReadExecAccess(const Item & item)
{ {
// there must be at least one 'x' (for the root) // there must be at least one 'x' (for the root)
// !! CHECK ME: is it applicable to directories too? // !! CHECK ME: is it applicable to directories too?
return (item.privileges & 01111) != 0; return (item.item_content.privileges & 01111) != 0;
} }
return HasAccess(item, 5); // r+x return HasAccess(item, 5); // r+x
@ -774,7 +783,7 @@ bool System::CanRemoveRenameChild(const Item & dir, long child_item_user_id)
if( !HasWriteAccess(dir) ) if( !HasWriteAccess(dir) )
return false; return false;
if( (dir.privileges & 010000) == 0 ) if( (dir.item_content.privileges & 010000) == 0 )
// there is no a sticky bit set to this directory // there is no a sticky bit set to this directory
return true; return true;
@ -783,10 +792,10 @@ bool System::CanRemoveRenameChild(const Item & dir, long child_item_user_id)
if( cur->session->puser->super_user ) if( cur->session->puser->super_user )
return true; return true;
if( dir.user_id != -1 && cur->session->puser->id != -1 && child_item_user_id != -1 ) if( dir.item_content.user_id != -1 && cur->session->puser->id != -1 && child_item_user_id != -1 )
{ {
if( cur->session->puser->id == child_item_user_id || if( cur->session->puser->id == child_item_user_id ||
cur->session->puser->id == dir.user_id ) cur->session->puser->id == dir.item_content.user_id )
return true; return true;
} }
} }
@ -867,12 +876,12 @@ return puser->IsMemberOf(group);
// the path depends on parent_id // the path depends on parent_id
bool System::CreateNewFileSimpleFs(Item & item) bool System::CreateNewFileSimpleFs(Item & item)
{ {
bool res = dirs.MakePath(item.parent_id, item.file_path); bool res = dirs.MakePath(item.parent_id, item.item_content.file_path);
if( res ) if( res )
{ {
if( !item.file_path.empty() && item.file_path[0] == '/' ) if( !item.item_content.file_path.empty() && item.item_content.file_path[0] == '/' )
item.file_path.erase(0, 1); item.item_content.file_path.erase(0, 1);
} }
else else
{ {
@ -897,7 +906,7 @@ size_t buffer_len = sizeof(buffer)/sizeof(wchar_t);
buffer[0] = '0'; buffer[0] = '0';
swprintf(buffer+1, buffer_len, L"%lx", (unsigned long)item.id); swprintf(buffer+1, buffer_len, L"%lx", (unsigned long)item.id);
item.file_path.clear(); item.item_content.file_path.clear();
// make sure that the length is even // make sure that the length is even
if( (wcslen(hash) & 1) != 0 ) if( (wcslen(hash) & 1) != 0 )
@ -905,16 +914,16 @@ size_t buffer_len = sizeof(buffer)/sizeof(wchar_t);
for(size_t i=0 ; hash[i] != 0 ; i+=2) for(size_t i=0 ; hash[i] != 0 ; i+=2)
{ {
item.file_path += hash[i]; item.item_content.file_path += hash[i];
item.file_path += hash[i+1]; item.item_content.file_path += hash[i+1];
if( hash[i+2] != 0 ) if( hash[i+2] != 0 )
item.file_path += '/'; item.item_content.file_path += '/';
} }
// one character more to make sure the path is unique // one character more to make sure the path is unique
// (we can have a directory without the character) // (we can have a directory without the character)
item.file_path += '_'; item.item_content.file_path += '_';
return true; return true;
} }
@ -939,18 +948,18 @@ bool res;
if( !pmount || pmount->fs != mounts.MountFsHashfs() ) if( !pmount || pmount->fs != mounts.MountFsHashfs() )
{ {
res = CreateNewFileSimpleFs(item); res = CreateNewFileSimpleFs(item);
item.file_fs = mounts.MountFsSimplefs(); item.item_content.file_fs = mounts.MountFsSimplefs();
} }
else else
{ {
res = CreateNewFileHashFs(item); res = CreateNewFileHashFs(item);
item.file_fs = mounts.MountFsHashfs(); item.item_content.file_fs = mounts.MountFsHashfs();
} }
if( res ) if( res )
item.file_path += item.url; item.item_content.file_path += item.url;
else else
item.file_path.clear(); item.item_content.file_path.clear();
return res; return res;
} }
@ -968,7 +977,7 @@ bool System::MakeFilePath(const Item & item, std::wstring & path, bool thumb, bo
return false; return false;
} }
if( item.file_path.empty() || item.file_type == WINIX_ITEM_FILETYPE_NONE ) if( item.item_content.file_path.empty() || item.item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
{ {
log << log1 << "System: MakePath: this item has not a static file" << logend; log << log1 << "System: MakePath: this item has not a static file" << logend;
return false; return false;
@ -976,7 +985,7 @@ bool System::MakeFilePath(const Item & item, std::wstring & path, bool thumb, bo
path = config->upload_dir; path = config->upload_dir;
if( item.file_fs == mounts.MountFsHashfs() ) if( item.item_content.file_fs == mounts.MountFsHashfs() )
path += L"/hashfs"; path += L"/hashfs";
else else
path += L"/simplefs"; path += L"/simplefs";
@ -988,11 +997,11 @@ bool System::MakeFilePath(const Item & item, std::wstring & path, bool thumb, bo
path += L"/normal"; path += L"/normal";
if( create_dir && !CreateDirs(path, item.file_path, chmod, group, true) ) if( create_dir && !CreateDirs(path, item.item_content.file_path, chmod, group, true) )
return false; return false;
path += '/'; path += '/';
path += item.file_path; path += item.item_content.file_path;
return true; return true;
} }
@ -1025,14 +1034,16 @@ return res;
Error System::AddFile(Item & item, int notify_code, bool call_plugins) bool System::AddFile(Item & item, int notify_code, bool call_plugins)
{ {
if( item.type != Item::file ) if( item.type != Item::file )
return WINIX_ERR_FILE_EXPECTED; return WINIX_ERR_FILE_EXPECTED;
Error status = db->AddItem(item);
//Error status = db->AddItem(item);
bool status = item.insert();
if( status == WINIX_ERR_OK ) if( status )
{ {
log << log2 << "System: added a new file, url: " << item.url << ", id: " << item.id log << log2 << "System: added a new file, url: " << item.url << ", id: " << item.id
<< ", parent_id: " << item.parent_id << logend; << ", parent_id: " << item.parent_id << logend;
@ -1050,20 +1061,22 @@ return status;
Error System::EditFile(Item & item, bool with_url, int notify_code, bool call_plugins) bool System::EditFile(Item & item, bool with_url, int notify_code, bool call_plugins)
{ {
if( item.type != Item::file ) if( item.type != Item::file )
return WINIX_ERR_FILE_EXPECTED; return WINIX_ERR_FILE_EXPECTED;
if( cur->session && cur->session->puser ) if( cur->session && cur->session->puser )
cur->request->item.modification_user_id = cur->session->puser->id; cur->request->item.item_content.modification_user_id = cur->session->puser->id;
else else
cur->request->item.modification_user_id = -1; cur->request->item.item_content.modification_user_id = -1;
item.SetDateModifyToNow(); item.item_content.SetDateModifyToNow();
Error status = db->EditItemById(item, with_url);
bool status = item.update(with_url, true);
//Error status = db->EditItemById(item, with_url);
if( status == WINIX_ERR_OK ) if( status )
{ {
TemplatesFunctions::pattern_cacher.UpdatePattern(item); TemplatesFunctions::pattern_cacher.UpdatePattern(item);
@ -1184,7 +1197,17 @@ int System::FollowLink(const std::vector<Item*> & current_dir_tab, const std::ws
if( res == 1 ) if( res == 1 )
{ {
if( db->GetItem(out_dir_tab.back()->id, name_temp, out_item) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
bool status = finder.
select().
where().
eq(L"parent_id", out_dir_tab.back()->id).
eq(L"url", name_temp).
get(out_item);
//if( db->GetItem(out_dir_tab.back()->id, name_temp, out_item) == WINIX_ERR_OK )
if( status )
return 1; return 1;
else else
return 2; return 2;
@ -1213,12 +1236,12 @@ bool System::FollowAllLinksDirFound(std::vector<Item*> & out_dir_tab,
return false; return false;
} }
if( !out_dir_tab.back()->link_to.empty() ) if( !out_dir_tab.back()->item_content.link_to.empty() )
{ {
if( follow_dir_default ) if( follow_dir_default )
{ {
if( !(stop_on_link_redirect && out_dir_tab.back()->link_redirect==1) ) if( !(stop_on_link_redirect && out_dir_tab.back()->item_content.link_redirect==1) )
link_to_temp = out_dir_tab.back()->link_to; link_to_temp = out_dir_tab.back()->item_content.link_to;
} }
} }
@ -1252,15 +1275,15 @@ bool System::FollowAllLinksFileOrSymlinkFound(std::vector<Item*> & out_dir_tab,
if( out_item.type == Item::symlink ) if( out_item.type == Item::symlink )
{ {
if( out_item.link_to.empty() ) if( out_item.item_content.link_to.empty() )
{ {
log << log1 << "System: symlink empty" << logend; log << log1 << "System: symlink empty" << logend;
return false; return false;
} }
else else
{ {
if( !(stop_on_link_redirect && out_item.link_redirect==1) ) if( !(stop_on_link_redirect && out_item.item_content.link_redirect==1) )
link_to_temp = out_item.link_to; link_to_temp = out_item.item_content.link_to;
} }
} }
@ -1392,8 +1415,8 @@ bool System::FollowAllLinks(const std::wstring & link_to,
cur->request->item.Clear(); cur->request->item.Clear();
cur->request->last_item = cur->request->dir_tab.back(); cur->request->last_item = cur->request->dir_tab.back();
if( !cur->request->dir_tab.back()->link_to.empty() ) if( !cur->request->dir_tab.back()->item_content.link_to.empty() )
RedirectTo(cur->request->dir_tab.back()->link_to); RedirectTo(cur->request->dir_tab.back()->item_content.link_to);
log << log3 << "System: current directory changed" << logend; log << log3 << "System: current directory changed" << logend;
} }
@ -1404,7 +1427,7 @@ bool System::FollowAllLinks(const std::wstring & link_to,
cur->request->last_item = &cur->request->item; cur->request->last_item = &cur->request->item;
if( cur->request->item.type == Item::symlink ) if( cur->request->item.type == Item::symlink )
RedirectTo(cur->request->item.link_to); // cur->request->item.link_to is not empty RedirectTo(cur->request->item.item_content.link_to); // cur->request->item.item_content.link_to is not empty
log << log3 << "System: current directory changed and the new file loaded" << logend; log << log3 << "System: current directory changed and the new file loaded" << logend;
} }
@ -1459,25 +1482,35 @@ bool System::AddCommonFileToVar(const wchar_t * file_path, const wchar_t * url,
return false; return false;
} }
if( db->GetItem(var->id, url, file_content_item) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
bool status = finder.select().where().eq(L"parent_id", var->id).eq(L"url", url).get(file_content_item);
//if( db->GetItem(var->id, url, file_content_item) == WINIX_ERR_OK )
if( status )
{ {
if( overwrite_existing ) if( overwrite_existing )
db->DelItem(file_content_item); {
file_content_item.remove();
//db->DelItem(file_content_item);
}
else else
{
return true; return true;
}
} }
file_content_item.Clear(); file_content_item.Clear();
file_content_item.parent_id = var->id; file_content_item.parent_id = var->id;
file_content_item.user_id = var->user_id; file_content_item.item_content.user_id = var->item_content.user_id;
file_content_item.group_id = var->group_id; file_content_item.item_content.group_id = var->item_content.group_id;
file_content_item.privileges = 07555; // !! IMPROVE ME: may it should be added as a parameter to this function? file_content_item.item_content.privileges = 07555; // !! IMPROVE ME: may it should be added as a parameter to this function?
file_content_item.subject = url; file_content_item.subject = url;
file_content_item.url = url; file_content_item.url = url;
file_content_item.type = Item::file; file_content_item.type = Item::file;
file_content_item.html_template = config->templates_index_raw; file_content_item.html_template = config->templates_index_raw;
file_content_item.content = file_content; file_content_item.item_content.content_raw = file_content;
file_content_item.content_type = Item::ct_other; file_content_item.item_content.content_raw_type = ItemContent::ct_other;
return AddFile(file_content_item, false) == WINIX_ERR_OK; return AddFile(file_content_item, false) == WINIX_ERR_OK;
} }

View File

@ -178,8 +178,8 @@ public:
bool MakePath(const Item & item, std::wstring & path, bool clear_path = true); bool MakePath(const Item & item, std::wstring & path, bool clear_path = true);
Error AddFile(Item & item, int notify_code = 0, bool call_plugins = true); bool AddFile(Item & item, int notify_code = 0, bool call_plugins = true);
Error EditFile(Item & item, bool with_url = true, int notify_code = 0, bool call_plugins = true); bool EditFile(Item & item, bool with_url = true, int notify_code = 0, bool call_plugins = true);
time_t ToLocal(time_t utc_time); time_t ToLocal(time_t utc_time);

View File

@ -65,6 +65,12 @@ void WinixModel::set_model_connector(morm::ModelConnector * model_connector)
} }
morm::ModelConnector * WinixModel::get_model_connector()
{
return model_connector;
}
void WinixModel::set_dependency(WinixBase * winix_base) void WinixModel::set_dependency(WinixBase * winix_base)
{ {
WinixBase::set_dependency(winix_base); WinixBase::set_dependency(winix_base);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2018, Tomasz Sowa * Copyright (c) 2018-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -52,6 +52,8 @@ public:
virtual ~WinixModel(); virtual ~WinixModel();
void set_model_connector(morm::ModelConnector * model_connector); void set_model_connector(morm::ModelConnector * model_connector);
morm::ModelConnector * get_model_connector();
void set_plugin(Plugin * plugin); void set_plugin(Plugin * plugin);
void set_dependency(WinixBase * winix_base); void set_dependency(WinixBase * winix_base);

View File

@ -2,11 +2,11 @@
db.o: db.h dbbase.h dbconn.h dbtextstream.h db.o: db.h dbbase.h dbconn.h dbtextstream.h
db.o: ../../../winix/winixd/core/textstream.h db.o: ../../../winix/winixd/core/textstream.h
db.o: ../../../winix/winixd/core/misc.h ../../../winix/winixd/core/item.h db.o: ../../../winix/winixd/core/misc.h
db.o: ../../../pikotools/space/space.h ../../../pikotools/textstream/types.h
db.o: ../../../pikotools/date/date.h ../../../pikotools/convert/inttostr.h
db.o: ../../../winix/winixd/core/requesttypes.h db.o: ../../../winix/winixd/core/requesttypes.h
db.o: ../../../pikotools/textstream/textstream.h db.o: ../../../pikotools/textstream/textstream.h
db.o: ../../../pikotools/space/space.h ../../../pikotools/textstream/types.h
db.o: ../../../pikotools/date/date.h ../../../pikotools/convert/inttostr.h
db.o: ../../../pikotools/membuffer/membuffer.h db.o: ../../../pikotools/membuffer/membuffer.h
db.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h db.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
db.o: ../../../winix/winixd/core/winix_const.h db.o: ../../../winix/winixd/core/winix_const.h
@ -23,21 +23,30 @@ db.o: ../../../pikotools/log/log.h ../../../pikotools/log/filelog.h
db.o: ../../../winix/winixd/core/log.h ../../../winix/winixd/core/synchro.h db.o: ../../../winix/winixd/core/log.h ../../../winix/winixd/core/synchro.h
db.o: ../../../winix/winixd/core/filelog.h ../../../winix/winixd/core/lock.h db.o: ../../../winix/winixd/core/filelog.h ../../../winix/winixd/core/lock.h
db.o: ../../../winix/winixd/core/synchro.h ../../../winix/winixd/core/error.h db.o: ../../../winix/winixd/core/synchro.h ../../../winix/winixd/core/error.h
db.o: dbitemquery.h ../../../winix/winixd/core/item.h dbitemcolumns.h db.o: dbitemquery.h dbitemcolumns.h ../../../winix/winixd/core/user.h
db.o: ../../../winix/winixd/core/user.h ../../../winix/winixd/core/group.h db.o: ../../../winix/winixd/core/group.h
db.o: ../../../winix/winixd/core/dircontainer.h db.o: ../../../winix/winixd/core/dircontainer.h
db.o: ../../../winix/winixd/core/winixbase.h db.o: ../../../winix/winixd/core/winixbase.h
db.o: ../../../winix/winixd/models/item.h ../../../morm/src/model.h
db.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h
db.o: ../../../morm/src/dbconnector.h ../../../morm/src/queryresult.h
db.o: ../../../morm/src/flatconnector.h ../../../morm/src/dbexpression.h
db.o: ../../../morm/src/baseexpression.h ../../../morm/src/morm_types.h
db.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h
db.o: ../../../morm/src/cursorhelper.h ../../../morm/src/finderhelper.h
db.o: ../../../morm/src/fieldvaluehelper.h ../../../morm/src/flatexpression.h
db.o: ../../../winix/winixd/models/itemcontent.h
db.o: ../../../winix/winixd/core/ugcontainer.h db.o: ../../../winix/winixd/core/ugcontainer.h
db.o: ../../../winix/winixd/core/misc.h db.o: ../../../winix/winixd/core/misc.h
dbbase.o: dbbase.h dbconn.h dbtextstream.h dbbase.o: dbbase.h dbconn.h dbtextstream.h
dbbase.o: ../../../winix/winixd/core/textstream.h dbbase.o: ../../../winix/winixd/core/textstream.h
dbbase.o: ../../../winix/winixd/core/misc.h ../../../winix/winixd/core/item.h dbbase.o: ../../../winix/winixd/core/misc.h
dbbase.o: ../../../winix/winixd/core/requesttypes.h
dbbase.o: ../../../pikotools/textstream/textstream.h
dbbase.o: ../../../pikotools/space/space.h dbbase.o: ../../../pikotools/space/space.h
dbbase.o: ../../../pikotools/textstream/types.h dbbase.o: ../../../pikotools/textstream/types.h
dbbase.o: ../../../pikotools/date/date.h dbbase.o: ../../../pikotools/date/date.h
dbbase.o: ../../../pikotools/convert/inttostr.h dbbase.o: ../../../pikotools/convert/inttostr.h
dbbase.o: ../../../winix/winixd/core/requesttypes.h
dbbase.o: ../../../pikotools/textstream/textstream.h
dbbase.o: ../../../pikotools/membuffer/membuffer.h dbbase.o: ../../../pikotools/membuffer/membuffer.h
dbbase.o: ../../../pikotools/textstream/types.h dbbase.o: ../../../pikotools/textstream/types.h
dbbase.o: ../../../pikotools/utf8/utf8.h dbbase.o: ../../../pikotools/utf8/utf8.h
@ -61,13 +70,13 @@ dbbase.o: ../../../winix/winixd/core/synchro.h
dbbase.o: ../../../winix/winixd/core/error.h dbbase.o: ../../../winix/winixd/core/error.h
dbbase.o: ../../../winix/winixd/core/misc.h dbbase.o: ../../../winix/winixd/core/misc.h
dbconn.o: dbconn.h dbtextstream.h ../../../winix/winixd/core/textstream.h dbconn.o: dbconn.h dbtextstream.h ../../../winix/winixd/core/textstream.h
dbconn.o: ../../../winix/winixd/core/misc.h ../../../winix/winixd/core/item.h dbconn.o: ../../../winix/winixd/core/misc.h
dbconn.o: ../../../winix/winixd/core/requesttypes.h
dbconn.o: ../../../pikotools/textstream/textstream.h
dbconn.o: ../../../pikotools/space/space.h dbconn.o: ../../../pikotools/space/space.h
dbconn.o: ../../../pikotools/textstream/types.h dbconn.o: ../../../pikotools/textstream/types.h
dbconn.o: ../../../pikotools/date/date.h dbconn.o: ../../../pikotools/date/date.h
dbconn.o: ../../../pikotools/convert/inttostr.h dbconn.o: ../../../pikotools/convert/inttostr.h
dbconn.o: ../../../winix/winixd/core/requesttypes.h
dbconn.o: ../../../pikotools/textstream/textstream.h
dbconn.o: ../../../pikotools/membuffer/membuffer.h dbconn.o: ../../../pikotools/membuffer/membuffer.h
dbconn.o: ../../../pikotools/textstream/types.h dbconn.o: ../../../pikotools/textstream/types.h
dbconn.o: ../../../pikotools/utf8/utf8.h dbconn.o: ../../../pikotools/utf8/utf8.h
@ -89,17 +98,15 @@ dbconn.o: ../../../winix/winixd/core/filelog.h
dbconn.o: ../../../winix/winixd/core/lock.h dbconn.o: ../../../winix/winixd/core/lock.h
dbconn.o: ../../../winix/winixd/core/synchro.h dbconn.o: ../../../winix/winixd/core/synchro.h
dbconn.o: ../../../winix/winixd/core/error.h dbconn.o: ../../../winix/winixd/core/error.h
dbitemcolumns.o: dbitemcolumns.h ../../../winix/winixd/core/item.h dbbase.h dbitemcolumns.o: dbitemcolumns.h dbbase.h dbconn.h dbtextstream.h
dbitemcolumns.o: dbconn.h dbtextstream.h
dbitemcolumns.o: ../../../winix/winixd/core/textstream.h dbitemcolumns.o: ../../../winix/winixd/core/textstream.h
dbitemcolumns.o: ../../../winix/winixd/core/misc.h dbitemcolumns.o: ../../../winix/winixd/core/misc.h
dbitemcolumns.o: ../../../winix/winixd/core/item.h dbitemcolumns.o: ../../../winix/winixd/core/requesttypes.h
dbitemcolumns.o: ../../../pikotools/textstream/textstream.h
dbitemcolumns.o: ../../../pikotools/space/space.h dbitemcolumns.o: ../../../pikotools/space/space.h
dbitemcolumns.o: ../../../pikotools/textstream/types.h dbitemcolumns.o: ../../../pikotools/textstream/types.h
dbitemcolumns.o: ../../../pikotools/date/date.h dbitemcolumns.o: ../../../pikotools/date/date.h
dbitemcolumns.o: ../../../pikotools/convert/inttostr.h dbitemcolumns.o: ../../../pikotools/convert/inttostr.h
dbitemcolumns.o: ../../../winix/winixd/core/requesttypes.h
dbitemcolumns.o: ../../../pikotools/textstream/textstream.h
dbitemcolumns.o: ../../../pikotools/membuffer/membuffer.h dbitemcolumns.o: ../../../pikotools/membuffer/membuffer.h
dbitemcolumns.o: ../../../pikotools/textstream/types.h dbitemcolumns.o: ../../../pikotools/textstream/types.h
dbitemcolumns.o: ../../../pikotools/utf8/utf8.h dbitemcolumns.o: ../../../pikotools/utf8/utf8.h
@ -123,16 +130,15 @@ dbitemcolumns.o: ../../../winix/winixd/core/filelog.h
dbitemcolumns.o: ../../../winix/winixd/core/lock.h dbitemcolumns.o: ../../../winix/winixd/core/lock.h
dbitemcolumns.o: ../../../winix/winixd/core/synchro.h dbitemcolumns.o: ../../../winix/winixd/core/synchro.h
dbitemcolumns.o: ../../../winix/winixd/core/error.h dbitemcolumns.o: ../../../winix/winixd/core/error.h
dbitemquery.o: dbitemquery.h ../../../winix/winixd/core/item.h dbitemquery.o: dbitemquery.h
dbtextstream.o: dbtextstream.h ../../../winix/winixd/core/textstream.h dbtextstream.o: dbtextstream.h ../../../winix/winixd/core/textstream.h
dbtextstream.o: ../../../winix/winixd/core/misc.h dbtextstream.o: ../../../winix/winixd/core/misc.h
dbtextstream.o: ../../../winix/winixd/core/item.h dbtextstream.o: ../../../winix/winixd/core/requesttypes.h
dbtextstream.o: ../../../pikotools/textstream/textstream.h
dbtextstream.o: ../../../pikotools/space/space.h dbtextstream.o: ../../../pikotools/space/space.h
dbtextstream.o: ../../../pikotools/textstream/types.h dbtextstream.o: ../../../pikotools/textstream/types.h
dbtextstream.o: ../../../pikotools/date/date.h dbtextstream.o: ../../../pikotools/date/date.h
dbtextstream.o: ../../../pikotools/convert/inttostr.h dbtextstream.o: ../../../pikotools/convert/inttostr.h
dbtextstream.o: ../../../winix/winixd/core/requesttypes.h
dbtextstream.o: ../../../pikotools/textstream/textstream.h
dbtextstream.o: ../../../pikotools/membuffer/membuffer.h dbtextstream.o: ../../../pikotools/membuffer/membuffer.h
dbtextstream.o: ../../../pikotools/textstream/types.h dbtextstream.o: ../../../pikotools/textstream/types.h
dbtextstream.o: ../../../pikotools/utf8/utf8.h dbtextstream.o: ../../../pikotools/utf8/utf8.h

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#include "dbbase.h" #include "dbbase.h"
#include "dbitemquery.h" #include "dbitemquery.h"
#include "dbitemcolumns.h" #include "dbitemcolumns.h"
#include "core/item.h" //#include "core/item.h"
#include "core/user.h" #include "core/user.h"
#include "core/group.h" #include "core/group.h"
#include "core/dircontainer.h" #include "core/dircontainer.h"
@ -60,12 +60,12 @@ class Db : public DbBase
{ {
public: public:
// !! przerobic tak aby GetItem zwracalo wszystkie pozycja // Db() : item_cols(*this)
// !! GetFile tylko dla plikow // {
// !! GetDir tylko dla katalogow // is_postgresql_smaller_than_10 = false;
// !! GetFile i GetDir beda uzywac GetItem // }
Db() : item_cols(*this) Db()
{ {
is_postgresql_smaller_than_10 = false; is_postgresql_smaller_than_10 = false;
} }
@ -83,91 +83,91 @@ public:
Error ChangeUserTimeZone(long user_id, size_t time_zone_id); Error ChangeUserTimeZone(long user_id, size_t time_zone_id);
Error RemoveUser(long user_id); Error RemoveUser(long user_id);
Error AddItem(Item & item); //Error AddItem(Item & item);
Error EditItemById(Item & item, bool with_url = true); //Error EditItemById(Item & item, bool with_url = true);
Error EditItemByUrl(Item & item, bool with_url = true); //Error EditItemByUrl(Item & item, bool with_url = true);
// !! nie zwracac zadnych kodow bledow? // !! nie zwracac zadnych kodow bledow?
void GetItems(std::vector<Item> & item_tab, const DbItemQuery & item_query); //void GetItems(std::vector<Item> & item_tab, const DbItemQuery & item_query);
void GetItems(std::vector<long> & item_tab, const DbItemQuery & item_query); //void GetItems(std::vector<long> & item_tab, const DbItemQuery & item_query);
Error GetItem(Item & item, const DbItemQuery & item_query); //Error GetItem(Item & item, const DbItemQuery & item_query);
bool GetPriv(Item & item, long id); //bool GetPriv(Item & item, long id);
Error EditPrivById(Item & item, long id); // !! dlaczego tu nie ma const? //Error EditPrivById(Item & item, long id); // !! dlaczego tu nie ma const?
Error EditParentUrlById(Item & item, long id); //Error EditParentUrlById(Item & item, long id);
Error EditFileById(const Item & item, long id); // file_path, file_fs, file_type //Error EditFileById(const Item & item, long id); // file_path, file_fs, file_type
Error EditHasThumbById(bool has_thumb, long id); //Error EditHasThumbById(bool has_thumb, long id);
Error EditMetaById(const PT::Space & meta, long id); //Error EditMetaById(const PT::Space & meta, long id);
Error EditAdminMetaById(const PT::Space & meta, long id); //Error EditAdminMetaById(const PT::Space & meta, long id);
Error DelDirById(long id); //Error DelDirById(long id);
Error DelFileById(long file_id); //Error DelFileById(long file_id);
Error DelSymlinkById(long symlink_id); //Error DelSymlinkById(long symlink_id);
Error EditSubjectById(Item & item, long id); //Error EditSubjectById(Item & item, long id);
Error DelItem(const Item & item); //Error DelItem(const Item & item);
void GetDirs(DirContainer & dir_tab); //void GetDirs(DirContainer & dir_tab);
void GetUsers(UGContainer<User> & user_tab); void GetUsers(UGContainer<User> & user_tab);
void GetGroups(UGContainer<Group> & group_tab); void GetGroups(UGContainer<Group> & group_tab);
// !! nowy interfejs // !! nowy interfejs
long Size(long parent_id, Item::Type type = Item::none); //long Size(long parent_id, Item::Type type = Item::none);
Error GetItemById(long item_id, Item & item); //Error GetItemById(long item_id, Item & item);
Error GetItem(long parent_id, const std::wstring & url, Item & item); //Error GetItem(long parent_id, const std::wstring & url, Item & item);
Error EditLinkItem(long id, const std::wstring & link_to, int link_redirect); //Error EditLinkItem(long id, const std::wstring & link_to, int link_redirect);
Error EditTemplateItemById(long id, const std::wstring & new_html_template); //Error EditTemplateItemById(long id, const std::wstring & new_html_template);
long GetItemId(long parent_id, const std::wstring & url, Item::Type type); //long GetItemId(long parent_id, const std::wstring & url, Item::Type type);
long GetFileId(long parent_id, const std::wstring & url); //long GetFileId(long parent_id, const std::wstring & url);
long GetDirId(long parent_id, const std::wstring & url); //long GetDirId(long parent_id, const std::wstring & url);
Error AddHardLink(Item & item); //Error AddHardLink(Item & item);
Error EditSortIndexItemById(long id, int sort_index); //Error EditSortIndexItemById(long id, int sort_index);
protected: protected:
DbTextStream query, query_create_url; DbTextStream query, query_create_url;
std::wstring temp_url; //std::wstring temp_url;
Item dir_temp; //Item dir_temp;
Item get_item_temp; //Item get_item_temp;
std::wstring iq_id_list; //std::wstring iq_id_list;
DbItemColumns item_cols; //DbItemColumns item_cols;
bool is_postgresql_smaller_than_10; bool is_postgresql_smaller_than_10;
std::wstring postgrsql_row_statement; std::wstring postgrsql_row_statement;
bool AddItemCreateUrlSubject(Item & item); //bool AddItemCreateUrlSubject(Item & item);
Error AddItemIntoContent(Item & item); //Error AddItemIntoContent(Item & item);
Error AddItemIntoItem(Item & item); //Error AddItemIntoItem(Item & item);
Error EditItemInItem(Item & item, bool with_url); //Error EditItemInItem(Item & item, bool with_url);
Error EditItemInContent(Item & item); //Error EditItemInContent(Item & item);
Error EditItemGetIdsByUrl(Item & item); //Error EditItemGetIdsByUrl(Item & item);
long GetContentId(long item_id); //long GetContentId(long item_id);
Error DelItemDelItem(long item_id, int type); //Error DelItemDelItem(long item_id, int type);
Error DelItemDelContent(long content_id); //Error DelItemDelContent(long content_id);
Error IncrementContentRef(long content_id); //Error IncrementContentRef(long content_id);
Error DecrementContentRef(long content_id); //Error DecrementContentRef(long content_id);
void GetItemsQuerySelect(const DbItemQuery & iq, DbTextStream & query, bool skip_other_sel); //void GetItemsQuerySelect(const DbItemQuery & iq, DbTextStream & query, bool skip_other_sel);
void GetItemsQueryJoin(const DbItemQuery & iq, DbTextStream & query); //void GetItemsQueryJoin(const DbItemQuery & iq, DbTextStream & query);
void GetItemsQueryWhere(const DbItemQuery & iq, DbTextStream & query); //void GetItemsQueryWhere(const DbItemQuery & iq, DbTextStream & query);
void GetItemsQueryOrder(bool sort_asc); //void GetItemsQueryOrder(bool sort_asc);
void GetItemsQueryOrder(const DbItemQuery & iq, DbTextStream & query); //void GetItemsQueryOrder(const DbItemQuery & iq, DbTextStream & query);
void GetItemsQueryLimit(const DbItemQuery & iq, DbTextStream & query); //void GetItemsQueryLimit(const DbItemQuery & iq, DbTextStream & query);
PGresult * GetItemsQuery(const DbItemQuery & iq, DbTextStream & query, bool skip_other_sel = false); //PGresult * GetItemsQuery(const DbItemQuery & iq, DbTextStream & query, bool skip_other_sel = false);
PGresult * GetItemsQuery(const DbItemQuery & iq, bool skip_other_sel = false); //PGresult * GetItemsQuery(const DbItemQuery & iq, bool skip_other_sel = false);
}; };

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -40,7 +40,7 @@
namespace Winix namespace Winix
{ {
/*
void DbItemColumns::SetColumns(PGresult * r) void DbItemColumns::SetColumns(PGresult * r)
{ {
@ -115,7 +115,7 @@ void DbItemColumns::SetItem(PGresult * r, long row, Item & item)
if( ameta != -1 ) db_base.AssertValueSpace(r, row, ameta, item.ameta); if( ameta != -1 ) db_base.AssertValueSpace(r, row, ameta, item.ameta);
} }
*/
} // namespace Winix } // namespace Winix

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -36,14 +36,14 @@
#define headerfile_winix_db_dbitemcolumns #define headerfile_winix_db_dbitemcolumns
#include <libpq-fe.h> #include <libpq-fe.h>
#include "core/item.h" //#include "core/item.h"
#include "dbbase.h" #include "dbbase.h"
namespace Winix namespace Winix
{ {
/*
struct DbItemColumns struct DbItemColumns
{ {
@ -91,7 +91,7 @@ private:
}; };
*/
} // namespace Winix } // namespace Winix

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2015, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,7 +39,7 @@
namespace Winix namespace Winix
{ {
/*
DbItemQuery::DbItemQuery() DbItemQuery::DbItemQuery()
{ {
@ -158,7 +158,7 @@ void DbItemQuery::Offset(long o)
offset = o; offset = o;
} }
*/
} // namespace Winix } // namespace Winix

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2015, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -36,14 +36,14 @@
#define headerfile_winix_db_dbitemquery #define headerfile_winix_db_dbitemquery
#include <vector> #include <vector>
#include "core/item.h" //#include "core/item.h"
namespace Winix namespace Winix
{ {
/*
struct DbItemQuery struct DbItemQuery
{ {
@ -101,6 +101,7 @@ struct DbItemQuery
}; };
*/
} // namespace Winix } // namespace Winix

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -135,15 +135,15 @@ bool Cp::CopyStaticFile(const std::wstring & from, const std::wstring & to)
void Cp::CopyStaticFile(Item & item) void Cp::CopyStaticFile(Item & item)
{ {
bool res1, res2, res3, res4, res5; bool ok = true;
res1 = system->MakeFilePath(item, old_path, false); ok = ok && system->MakeFilePath(item, old_path, false);
res2 = !item.has_thumb || system->MakeFilePath(item, old_path_thumb, true); ok = ok && (!item.item_content.file_has_thumb || system->MakeFilePath(item, old_path_thumb, true));
res3 = system->CreateNewFile(item); ok = ok && system->CreateNewFile(item);
res4 = system->MakeFilePath(item, new_path, false, true, config->upload_dirs_chmod); ok = ok && system->MakeFilePath(item, new_path, false, true, config->upload_dirs_chmod);
res5 = !item.has_thumb || system->MakeFilePath(item, new_path_thumb, true, true, config->upload_dirs_chmod); ok = ok && (!item.item_content.file_has_thumb || system->MakeFilePath(item, new_path_thumb, true, true, config->upload_dirs_chmod));
if( !res1 || !res2 || !res3 || !res4 || !res5 ) if( !ok )
{ {
cur->request->status = WINIX_ERR_PERMISSION_DENIED; cur->request->status = WINIX_ERR_PERMISSION_DENIED;
return; return;
@ -151,9 +151,14 @@ bool res1, res2, res3, res4, res5;
if( CopyStaticFile(old_path, new_path) ) if( CopyStaticFile(old_path, new_path) )
{ {
cur->request->status = db->EditFileById(item, item.id); //cur->request->status = db->EditFileById(item, item.id);
if( !item.update(false, true) )
{
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
}
if( item.has_thumb )
if( item.item_content.file_has_thumb )
CopyStaticFile(old_path_thumb, new_path_thumb); CopyStaticFile(old_path_thumb, new_path_thumb);
} }
} }
@ -162,9 +167,9 @@ bool res1, res2, res3, res4, res5;
void Cp::SetNewAttributes(Item & item) void Cp::SetNewAttributes(Item & item)
{ {
item.user_id = new_user; item.item_content.user_id = new_user;
item.group_id = new_group; item.item_content.group_id = new_group;
item.SetDateModifyToNow(); item.item_content.SetDateModifyToNow();
} }
@ -174,11 +179,12 @@ void Cp::CopyFile(Item & item, long dst_dir_id)
SetNewAttributes(item); SetNewAttributes(item);
item.parent_id = dst_dir_id; item.parent_id = dst_dir_id;
cur->request->status = db->AddItem(item);
if( cur->request->status == WINIX_ERR_OK ) // cur->request->status = db->AddItem(item);
// if( cur->request->status == WINIX_ERR_OK )
if( item.insert() )
{ {
if( item.file_type != WINIX_ITEM_FILETYPE_NONE ) if( item.item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
CopyStaticFile(item); CopyStaticFile(item);
plugin->Call(WINIX_FILE_COPIED, &item); plugin->Call(WINIX_FILE_COPIED, &item);
@ -195,7 +201,7 @@ void Cp::CopyFileOrSymlink(Item & item, long dst_dir_id)
{ {
if( system->dirs.CreateDirTab(item.parent_id, symlink_dir_tab) ) if( system->dirs.CreateDirTab(item.parent_id, symlink_dir_tab) )
{ {
int res = system->FollowAllLinks(symlink_dir_tab, item.link_to, symlink_dir_tab, item); int res = system->FollowAllLinks(symlink_dir_tab, item.item_content.link_to, symlink_dir_tab, item);
if( res == 0 ) if( res == 0 )
CopyDirTree(*symlink_dir_tab.back(), dst_dir_id); CopyDirTree(*symlink_dir_tab.back(), dst_dir_id);
@ -215,11 +221,11 @@ void Cp::CopyFileOrSymlink(Item & item, long dst_dir_id)
void Cp::Prepare() void Cp::Prepare()
{ {
iq.SetAll(true, false); // iq.SetAll(true, false);
iq.WhereType(Item::dir, false); // iq.WhereType(Item::dir, false);
new_user = -1; new_user = -1;
new_group = dir_tab.back()->group_id; new_group = dir_tab.back()->item_content.group_id;
if( cur->session->puser ) if( cur->session->puser )
new_user = cur->session->puser->id; new_user = cur->session->puser->id;
@ -232,8 +238,17 @@ void Cp::Prepare()
void Cp::CopyFilesInDir(const Item & dir, long dst_dir_id) void Cp::CopyFilesInDir(const Item & dir, long dst_dir_id)
{ {
iq.WhereParentId(dir.id); morm::Finder<Item> finder(model_connector);
db->GetItems(item_tab, iq);
item_tab = finder.
select().
where().
neq(L"type", static_cast<int>(Item::dir)).
eq(L"parent_id", dir.id).
get_vector();
//iq.WhereParentId(dir.id);
//db->GetItems(item_tab, iq);
for(size_t i=0 ; i<item_tab.size() ; ++i) for(size_t i=0 ; i<item_tab.size() ; ++i)
CopyFileOrSymlink(item_tab[i], dst_dir_id); CopyFileOrSymlink(item_tab[i], dst_dir_id);
@ -291,8 +306,8 @@ long Cp::CopyDirTree(const Item & dir, long dst_dir_id)
if( remove_defaults ) if( remove_defaults )
{ {
temp.link_to.clear(); temp.item_content.link_to.clear();
temp.link_redirect = 0; temp.item_content.link_redirect = 0;
} }
cur->request->status = system->dirs.AddDirectory(temp); cur->request->status = system->dirs.AddDirectory(temp);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -57,7 +57,6 @@ public:
private: private:
Item temp; Item temp;
DbItemQuery iq;
bool remove_defaults; bool remove_defaults;
bool preserve_attr; bool preserve_attr;
bool follow_symlinks; bool follow_symlinks;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -59,17 +59,16 @@ void Default::MakePost()
{ {
Item & dir = *cur->request->dir_tab.back(); Item & dir = *cur->request->dir_tab.back();
dir.link_to = cur->request->PostVar(L"linkto"); dir.item_content.link_to = cur->request->PostVar(L"linkto");
dir.link_redirect = cur->request->IsPostVar(L"makeredirect") ? 1 : 0; dir.item_content.link_redirect = cur->request->IsPostVar(L"makeredirect") ? 1 : 0;
TrimWhite(dir.link_to); TrimWhite(dir.item_content.link_to);
// !! dodac sprawdzenie czy link_to jest pusty teraz // !! IMPROVEME dodac sprawdzenie czy link_to jest pusty teraz
cur->request->status = db->EditLinkItem(dir.id, dir.link_to, dir.link_redirect); //cur->request->status = db->EditLinkItem(dir.id, dir.link_to, dir.link_redirect);
if( dir.update(false, true) )
if( cur->request->status == WINIX_ERR_OK )
{ {
log << log2 << "Default: changed link_to: " << dir.link_to << ", for dir_id: " << dir.id << logend; log << log2 << "Default: changed link_to: " << dir.item_content.link_to << ", for dir_id: " << dir.id << logend;
system->RedirectToLastDir(); system->RedirectToLastDir();
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -63,8 +63,8 @@ void Download::MakeGet()
if( !system->HasReadAccess(cur->request->item) || if( !system->HasReadAccess(cur->request->item) ||
cur->request->item.file_type == WINIX_ITEM_FILETYPE_NONE || cur->request->item.item_content.file_type == WINIX_ITEM_FILETYPE_NONE ||
cur->request->item.file_path.empty() ) cur->request->item.item_content.file_path.empty() )
{ {
cur->request->status = WINIX_ERR_PERMISSION_DENIED; cur->request->status = WINIX_ERR_PERMISSION_DENIED;
return; return;
@ -72,7 +72,7 @@ void Download::MakeGet()
cur->request->send_as_attachment = cur->request->IsParam(L"attachment"); cur->request->send_as_attachment = cur->request->IsParam(L"attachment");
if( cur->request->item.has_thumb && cur->request->IsParam(L"thumb") ) if( cur->request->item.item_content.file_has_thumb && cur->request->IsParam(L"thumb") )
system->MakeFilePath(cur->request->item, cur->request->x_sendfile, true); system->MakeFilePath(cur->request->item, cur->request->x_sendfile, true);
else else
system->MakeFilePath(cur->request->item, cur->request->x_sendfile); system->MakeFilePath(cur->request->item, cur->request->x_sendfile);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -149,7 +149,7 @@ void Emacs::MakePost()
{ {
cur->request->is_item = true; // !! moze lepiej nie ustawiac is_item? (bo jak wystapi blad np dodania do bazy danych cur->request->is_item = true; // !! moze lepiej nie ustawiac is_item? (bo jak wystapi blad np dodania do bazy danych
// to formularz edycji zmieni sie z 'dodaj' na 'edytuj' // to formularz edycji zmieni sie z 'dodaj' na 'edytuj'
cur->request->item.privileges = system->NewFilePrivileges(); cur->request->item.item_content.privileges = system->NewFilePrivileges();
cur->request->status = system->AddFile(cur->request->item, NotifyCodeAdd()); cur->request->status = system->AddFile(cur->request->item, NotifyCodeAdd());
} }
else else

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -47,9 +47,9 @@ FunctionBase::FunctionBase()
need_ssl = false; need_ssl = false;
need_session = true; need_session = true;
fun.user_id = -1; fun.item_content.user_id = -1;
fun.group_id = -1; fun.item_content.group_id = -1;
fun.privileges = 07555; fun.item_content.privileges = 07555;
fun.parent_id = -1; fun.parent_id = -1;
fun.id = -1; fun.id = -1;
fun.type = Item::file; fun.type = Item::file;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -37,7 +37,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "core/item.h"
#include "db/db.h" #include "db/db.h"
#include "core/request.h" #include "core/request.h"
#include "core/config.h" #include "core/config.h"
@ -45,6 +44,7 @@
#include "core/synchro.h" #include "core/synchro.h"
#include "notify/notify.h" #include "notify/notify.h"
#include "core/winixrequest.h" #include "core/winixrequest.h"
#include "models/item.h"

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -34,10 +34,10 @@
#include "functionparser.h" #include "functionparser.h"
#include "core/log.h" #include "core/log.h"
#include "core/item.h"
#include "core/error.h" #include "core/error.h"
#include "functions.h" #include "functions.h"
#include "utf8/utf8.h" #include "utf8/utf8.h"
#include "models/item.h"
@ -141,17 +141,26 @@ bool FunctionParser::CheckAddItem()
{ {
// cur->request->dir_tab has at least one element // cur->request->dir_tab has at least one element
long parent_id = cur->request->dir_tab.back()->id; long parent_id = cur->request->dir_tab.back()->id;
Error status = db->GetItem(parent_id, name, cur->request->item);
if( status == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", parent_id).
eq(L"url", name).
get(cur->request->item);
//Error status = db->GetItem(parent_id, name, cur->request->item);
//if( status == WINIX_ERR_OK )
if( cur->request->item.found() )
{ {
log << log3 << "FP: Item: id: " << cur->request->item.id << ", url: " << cur->request->item.url << logend; log << log3 << "FP: Item: id: " << cur->request->item.id << ", url: " << cur->request->item.url << logend;
cur->request->last_item = &cur->request->item; cur->request->last_item = &cur->request->item;
cur->request->is_item = true; cur->request->is_item = true;
return true; return true;
} }
else
if( status == WINIX_ERR_NO_ITEM )
{ {
log << log3 << "FP: No Item: url: " << name << logend; log << log3 << "FP: No Item: url: " << name << logend;
cur->request->status = WINIX_ERR_NO_ITEM; cur->request->status = WINIX_ERR_NO_ITEM;

View File

@ -169,7 +169,7 @@ Error Functions::CheckSpecialFile(const Item & item)
log << log3 << "Functions: reloading mount points" << logend; log << log3 << "Functions: reloading mount points" << logend;
cur->mount = system->mounts.GetEmptyMount(); cur->mount = system->mounts.GetEmptyMount();
system->mounts.ReadMounts(item.content); system->mounts.ReadMounts(item.item_content.content_raw);
cur->mount = system->mounts.pmount; cur->mount = system->mounts.pmount;
templates->ReadNewIndexTemplates(); templates->ReadNewIndexTemplates();
templates->ReadNewChangeTemplates(); templates->ReadNewChangeTemplates();
@ -302,7 +302,7 @@ void Functions::Parse()
void Functions::SetDefaultFunctionForFile() void Functions::SetDefaultFunctionForFile()
{ {
if( cur->request->item.file_type != WINIX_ITEM_FILETYPE_NONE ) if( cur->request->item.item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
cur->request->function = &fun_download; cur->request->function = &fun_download;
else else
if( system->HasReadExecAccess(cur->request->item) ) if( system->HasReadExecAccess(cur->request->item) )
@ -359,13 +359,13 @@ void Functions::CheckFunctionFollowDir(bool was_default_function)
if( was_default_function ) if( was_default_function )
{ {
if( cur->request->dir_tab.back()->link_redirect == 1 ) if( cur->request->dir_tab.back()->item_content.link_redirect == 1 )
{ {
system->RedirectTo(cur->request->dir_tab.back()->link_to); system->RedirectTo(cur->request->dir_tab.back()->item_content.link_to);
} }
else else
{ {
if( system->FollowAllLinks(cur->request->dir_tab.back()->link_to, true, true) ) if( system->FollowAllLinks(cur->request->dir_tab.back()->item_content.link_to, true, true) )
SetDefaultFunction(); SetDefaultFunction();
} }
} }
@ -375,15 +375,15 @@ void Functions::CheckFunctionFollowDir(bool was_default_function)
void Functions::CheckFunctionFollowSymlink(bool was_default_function) void Functions::CheckFunctionFollowSymlink(bool was_default_function)
{ {
if( cur->request->item.link_redirect == 1 ) if( cur->request->item.item_content.link_redirect == 1 )
{ {
if( was_default_function ) if( was_default_function )
system->RedirectTo(cur->request->item.link_to); system->RedirectTo(cur->request->item.item_content.link_to);
else else
system->RedirectWithFunctionAndParamsTo(cur->request->item.link_to); system->RedirectWithFunctionAndParamsTo(cur->request->item.item_content.link_to);
} }
else else
if( system->FollowAllLinks(cur->request->item.link_to, true, true) ) if( system->FollowAllLinks(cur->request->item.item_content.link_to, true, true) )
{ {
if( was_default_function ) if( was_default_function )
SetDefaultFunction(); SetDefaultFunction();
@ -415,7 +415,7 @@ bool was_default_function = false;
if( cur->request->status != WINIX_ERR_OK || !cur->request->redirect_to.empty() ) if( cur->request->status != WINIX_ERR_OK || !cur->request->redirect_to.empty() )
return; return;
if( !cur->request->is_item && !cur->request->dir_tab.back()->link_to.empty() ) if( !cur->request->is_item && !cur->request->dir_tab.back()->item_content.link_to.empty() )
CheckFunctionFollowDir(was_default_function); CheckFunctionFollowDir(was_default_function);
else else
if( cur->request->is_item && cur->request->item.type == Item::symlink && cur->request->function && cur->request->function->follow_symlinks ) if( cur->request->is_item && cur->request->item.type == Item::symlink && cur->request->function && cur->request->function->follow_symlinks )
@ -603,7 +603,7 @@ void Functions::ReadItemFilterHtml(Item & item)
html_filter.ClearOrphans(); html_filter.ClearOrphans();
// SetNoFilterTag doesn't have to be called (default empty tag) // SetNoFilterTag doesn't have to be called (default empty tag)
html_filter.Filter(cur->request->PostVar(L"itemcontent"), item.content); html_filter.Filter(cur->request->PostVar(L"itemcontent"), item.item_content.content_raw);
} }
@ -618,13 +618,13 @@ void Functions::ReadItemContent(Item & item, const std::wstring & content_type)
if( filter_html ) if( filter_html )
ReadItemFilterHtml(item); ReadItemFilterHtml(item);
else else
cur->request->PostVar(L"itemcontent", item.content); cur->request->PostVar(L"itemcontent", item.item_content.content_raw);
} }
void Functions::ReadItemContentWithType(Item & item) void Functions::ReadItemContentWithType(Item & item)
{ {
item.content_type = Item::ct_formatted_text; // default is formatted text item.item_content.content_raw_type = ItemContent::ct_formatted_text; // default is formatted text
cur->request->PostVar(L"contenttype", temp); cur->request->PostVar(L"contenttype", temp);
ReadItemContent(item, temp); ReadItemContent(item, temp);
@ -633,10 +633,10 @@ void Functions::ReadItemContentWithType(Item & item)
// ct_text and ct_formatted_text can use everyone // ct_text and ct_formatted_text can use everyone
if( temp == L"0" ) if( temp == L"0" )
item.content_type = Item::ct_text; item.item_content.content_raw_type = ItemContent::ct_text;
else else
if( temp == L"1" ) if( temp == L"1" )
item.content_type = Item::ct_formatted_text; item.item_content.content_raw_type = ItemContent::ct_formatted_text;
// those below need special privileges // those below need special privileges
@ -649,19 +649,19 @@ void Functions::ReadItemContentWithType(Item & item)
if( temp == L"2" ) if( temp == L"2" )
{ {
if( system->CanUseHtml(user_id) ) if( system->CanUseHtml(user_id) )
item.content_type = Item::ct_html; item.item_content.content_raw_type = ItemContent::ct_html;
} }
else else
if( temp == L"3" ) if( temp == L"3" )
{ {
if( system->CanUseBBCode(user_id) ) if( system->CanUseBBCode(user_id) )
item.content_type = Item::ct_bbcode; item.item_content.content_raw_type = ItemContent::ct_bbcode;
} }
else else
if( temp == L"4" ) if( temp == L"4" )
{ {
if( system->CanUseOther(user_id) ) if( system->CanUseOther(user_id) )
item.content_type = Item::ct_other; item.item_content.content_raw_type = ItemContent::ct_other;
} }
} }
@ -691,16 +691,16 @@ void Functions::SetUser(Item & item)
{ {
if( cur->session && cur->session->puser ) if( cur->session && cur->session->puser )
{ {
item.user_id = cur->session->puser->id; item.item_content.user_id = cur->session->puser->id;
item.guest_name.clear(); item.item_content.guest_name.clear();
} }
else else
{ {
item.user_id = -1; item.item_content.user_id = -1;
cur->request->PostVar(L"guestname", item.guest_name); cur->request->PostVar(L"guestname", item.item_content.guest_name);
} }
item.group_id = cur->request->dir_tab.back()->group_id; item.item_content.group_id = cur->request->dir_tab.back()->item_content.group_id;
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2013-2014, Tomasz Sowa * Copyright (c) 2013-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -63,13 +63,23 @@ bool ImgCrop::HasAccess()
void ImgCrop::GetDirContent() void ImgCrop::GetDirContent()
{ {
iq.sel_type = Item::file; // iq.sel_type = Item::file;
iq.sel_content = false; // iq.sel_content = false;
//
// iq.WhereParentId(cur->request->dir_tab.back()->id);
// iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
iq.WhereParentId(cur->request->dir_tab.back()->id); morm::Finder<Item> finder(model_connector);
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
db->GetItems(cur->request->item_tab, iq); cur->request->item_tab = finder.
select().
where().
eq(L"type", static_cast<int>(Item::file)).
eq(L"parent_id", cur->request->dir_tab.back()->id).
eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE).
get_vector();
//db->GetItems(cur->request->item_tab, iq);
system->CheckWriteAccessToItems(cur->request->item_tab); system->CheckWriteAccessToItems(cur->request->item_tab);
} }
@ -89,7 +99,7 @@ void ImgCrop::MakePost()
Item & item = cur->request->item; Item & item = cur->request->item;
if( cur->request->is_item && item.type == Item::file && item.file_type == WINIX_ITEM_FILETYPE_IMAGE ) if( cur->request->is_item && item.type == Item::file && item.item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE )
{ {
if( system->HasWriteAccess(item) ) if( system->HasWriteAccess(item) )
{ {

View File

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

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -62,17 +62,19 @@ bool Ln::HasAccess()
bool Ln::CreateSymbolicLink(long parent_id, const wchar_t * link_to, const wchar_t * url, bool link_redirect) bool Ln::CreateSymbolicLink(long parent_id, const wchar_t * link_to, const wchar_t * url, bool link_redirect)
{ {
item.set_connector(model_connector);
item.Clear(); // setting the date to now item.Clear(); // setting the date to now
item.type = Item::symlink; item.type = Item::symlink;
item.parent_id = parent_id; item.parent_id = parent_id;
item.url = url; item.url = url;
item.link_to = link_to; item.item_content.link_to = link_to;
item.link_redirect = static_cast<int>(link_redirect); item.item_content.link_redirect = static_cast<int>(link_redirect);
item.privileges = system->NewFilePrivileges(); item.item_content.privileges = system->NewFilePrivileges();
functions->SetUser(item); functions->SetUser(item);
functions->PrepareUrl(item); functions->PrepareUrl(item);
return db->AddItem(item) == WINIX_ERR_OK; return item.insert();
//return db->AddItem(item) == WINIX_ERR_OK;
} }
@ -124,7 +126,11 @@ bool Ln::CreateHardLink(const std::vector<Item*> & dirs, const std::wstring & li
item.url = url; item.url = url;
functions->PrepareUrl(item); functions->PrepareUrl(item);
return db->AddHardLink(item) == WINIX_ERR_OK; /*
* IMPROVEME
*
*/
//return db->AddHardLink(item) == WINIX_ERR_OK;
} }
return false; return false;

View File

@ -61,22 +61,33 @@ void Ls::MakeGet()
if( !cur->request->is_item ) if( !cur->request->is_item )
{ {
DbItemQuery iq; // DbItemQuery iq;
//
// iq.sel_content = false;
//
// iq.WhereParentId(cur->request->dir_tab.back()->id);
// iq.WhereType(Item::dir, false);
iq.sel_content = false; morm::Finder<Item> finder(model_connector);
iq.WhereParentId(cur->request->dir_tab.back()->id); finder.
iq.WhereType(Item::dir, false); select().
where().
eq(L"parent_id", cur->request->dir_tab.back()->id).
neq(L"type", static_cast<int>(Item::dir));
if( cur->request->IsParam(L"ckeditor_browse") ) if( cur->request->IsParam(L"ckeditor_browse") )
{ {
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE); //iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
db->GetItems(cur->request->item_tab, iq); //db->GetItems(cur->request->item_tab, iq);
} finder.eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE);
else
{
db->GetItems(cur->request->item_tab, iq);
} }
// else
// {
// //db->GetItems(cur->request->item_tab, iq);
// }
finder.get_vector(cur->request->item_tab);
} }
} }

View File

@ -71,18 +71,21 @@ return (conf_parser.ParseString(meta_str) == PT::SpaceParser::ok);
bool Meta::EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log) bool Meta::EditAdminMeta(Item & item, const std::wstring & meta_str, bool use_ses_log)
{ {
if( Parse(meta_str) ) if( Parse(meta_str) )
{ {
if( db->EditAdminMetaById(space, item_id) == WINIX_ERR_OK ) item.item_content.meta_admin = space;
//if( db->EditAdminMetaById(space, item_id) == WINIX_ERR_OK )
if( item.update(false, true) )
{ {
return true; return true;
} }
else else
{ {
log << log1 << "Meta: a database problem with changing admin meta information for item id: " log << log1 << "Meta: a database problem with changing admin meta information for item id: "
<< item_id << logend; << item.id << logend;
} }
} }
else else
@ -98,18 +101,21 @@ return false;
bool Meta::EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log) bool Meta::EditMeta(Item & item, const std::wstring & meta_str, bool use_ses_log)
{ {
if( Parse(meta_str) ) if( Parse(meta_str) )
{ {
if( db->EditMetaById(space, item_id) == WINIX_ERR_OK ) item.item_content.meta = space;
//if( db->EditMetaById(space, item_id) == WINIX_ERR_OK )
if( item.update(false, true) )
{ {
return true; return true;
} }
else else
{ {
log << log1 << "Meta: a database problem with changing meta information for item id: " log << log1 << "Meta: a database problem with changing meta information for item id: "
<< item_id << logend; << item.id << logend;
} }
} }
else else
@ -133,11 +139,8 @@ void Meta::ChangeAdminMeta()
{ {
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta"); const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
if( EditAdminMeta(cur->request->last_item->id, meta_str, true) ) if( EditAdminMeta(*cur->request->last_item, meta_str, true) )
{ {
if( cur->request->last_item->type == Item::dir )
cur->request->last_item->ameta = space;
system->RedirectToLastItem(); system->RedirectToLastItem();
} }
} }
@ -150,11 +153,8 @@ void Meta::ChangeMeta()
{ {
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta"); const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
if( EditMeta(cur->request->last_item->id, meta_str, true) ) if( EditMeta(*cur->request->last_item, meta_str, true) )
{ {
if( cur->request->last_item->type == Item::dir )
cur->request->last_item->meta = space;
system->RedirectToLastItem(); system->RedirectToLastItem();
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2014, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -55,8 +55,8 @@ public:
bool HasAccess(); bool HasAccess();
void MakePost(); void MakePost();
bool EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false); bool EditAdminMeta(Item & item, const std::wstring & meta_str, bool use_ses_log = false);
bool EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false); bool EditMeta(Item & item, const std::wstring & meta_str, bool use_ses_log = false);
private: private:

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -92,7 +92,7 @@ void Mkdir::PostFunMkdir(bool add_to_dir_tab, int privileges)
{ {
functions->ReadItem(cur->request->item, Item::dir); functions->ReadItem(cur->request->item, Item::dir);
functions->SetUser(cur->request->item); functions->SetUser(cur->request->item);
cur->request->item.privileges = privileges; cur->request->item.item_content.privileges = privileges;
Item * pdir; Item * pdir;
cur->request->status = system->dirs.AddDirectory(cur->request->item, add_to_dir_tab, &pdir); cur->request->status = system->dirs.AddDirectory(cur->request->item, add_to_dir_tab, &pdir);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -62,7 +62,7 @@ bool Mv::HasAccess()
{ {
if( cur->request->is_item ) if( cur->request->is_item )
{ {
if( !system->CanRemoveRenameChild(*cur->request->dir_tab.back(), cur->request->item.user_id) ) if( !system->CanRemoveRenameChild(*cur->request->dir_tab.back(), cur->request->item.item_content.user_id) )
return false; return false;
} }
else else
@ -102,7 +102,7 @@ bool Mv::CheckAccessFromToDir(const Item & dir, bool only_content)
// ops, there is no a parent dir // ops, there is no a parent dir
return false; return false;
if( !system->CanRemoveRenameChild(*last_but_one_dir, dir.user_id) ) if( !system->CanRemoveRenameChild(*last_but_one_dir, dir.item_content.user_id) )
return false; return false;
} }
@ -115,26 +115,26 @@ return true;
// !! IMPROVE ME: may a better name? // !! IMPROVE ME: may a better name?
void Mv::Prepare() void Mv::Prepare()
{ {
content_dir_iq.SetAll(false, false); // content_dir_iq.SetAll(false, false);
content_dir_iq.sel_parent_id = true; // content_dir_iq.sel_parent_id = true;
content_dir_iq.sel_type = true; // content_dir_iq.sel_type = true;
content_dir_iq.sel_url = true; // content_dir_iq.sel_url = true;
content_dir_iq.sel_file = true; // content_dir_iq.sel_file = true;
content_dir_iq.sel_user_id = true; // content_dir_iq.sel_user_id = true;
content_dir_iq.sel_group_id = true; // content_dir_iq.sel_group_id = true;
content_dir_iq.sel_privileges = true; // content_dir_iq.sel_privileges = true;
content_dir_iq.sel_meta = true; // content_dir_iq.sel_meta = true;
//
files_iq.SetAll(false, false); // files_iq.SetAll(false, false);
files_iq.sel_parent_id = true; // files_iq.sel_parent_id = true;
files_iq.sel_type = true; // files_iq.sel_type = true;
files_iq.sel_url = true; // files_iq.sel_url = true;
files_iq.sel_file = true; // files_iq.sel_file = true;
files_iq.sel_user_id = true; // files_iq.sel_user_id = true;
files_iq.sel_group_id = true; // files_iq.sel_group_id = true;
files_iq.sel_privileges = true; // files_iq.sel_privileges = true;
files_iq.sel_meta = true; // files_iq.sel_meta = true;
files_iq.WhereType(Item::dir, false); // files_iq.WhereType(Item::dir, false);
} }
@ -169,7 +169,17 @@ bool Mv::ParseDirCheckLastName()
} }
else else
{ {
if( db->GetItem(out_dir_tab.back()->id, out_filename, out_item) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
out_item = finder.
select().
where().
eq(L"parent_id", out_dir_tab.back()->id).
eq(L"url", out_filename).
get();
//if( db->GetItem(out_dir_tab.back()->id, out_filename, out_item) == WINIX_ERR_OK )
if( out_item.found() )
{ {
out_has_file = true; out_has_file = true;
out_filename.clear(); out_filename.clear();
@ -219,7 +229,7 @@ bool Mv::CanRemoveRenameChild(const Item & child)
{ {
Item * parent_dir = system->dirs.GetDir(child.parent_id); Item * parent_dir = system->dirs.GetDir(child.parent_id);
if( !parent_dir || !system->CanRemoveRenameChild(*parent_dir, child.user_id) ) if( !parent_dir || !system->CanRemoveRenameChild(*parent_dir, child.item_content.user_id) )
{ {
log << log1 << "Mv: permission denied to: " << child.url << logend; log << log1 << "Mv: permission denied to: " << child.url << logend;
slog << logerror << T("mv_permission_denied_to") << ": " << child.url << logend; slog << logerror << T("mv_permission_denied_to") << ": " << child.url << logend;
@ -255,15 +265,16 @@ bool Mv::MoveStaticFile(const std::wstring & from, const std::wstring & to)
void Mv::MoveStaticFile(Item & item) void Mv::MoveStaticFile(Item & item)
{ {
bool res1, res2, res3, res4, res5; bool ok = true;
//bool res1, res2, res3, res4, res5;
res1 = system->MakeFilePath(item, old_static_path, false); ok = ok && system->MakeFilePath(item, old_static_path, false);
res2 = !item.has_thumb || system->MakeFilePath(item, old_static_thumb_path, true); ok = ok && (!item.item_content.file_has_thumb || system->MakeFilePath(item, old_static_thumb_path, true));
res3 = system->CreateNewFile(item); ok = ok && system->CreateNewFile(item);
res4 = system->MakeFilePath(item, new_static_path, false, true, config->upload_dirs_chmod); ok = ok && system->MakeFilePath(item, new_static_path, false, true, config->upload_dirs_chmod);
res5 = !item.has_thumb || system->MakeFilePath(item, new_static_thumb_path, true, true, config->upload_dirs_chmod); ok = ok && (!item.item_content.file_has_thumb || system->MakeFilePath(item, new_static_thumb_path, true, true, config->upload_dirs_chmod));
if( !res1 || !res2 || !res3 || !res4 || !res5 ) if( !ok )
{ {
log << log1 << "Mv: cannot create a static path" << logend; log << log1 << "Mv: cannot create a static path" << logend;
slog << logerror << T("internal_error") << logend; slog << logerror << T("internal_error") << logend;
@ -272,14 +283,15 @@ bool res1, res2, res3, res4, res5;
if( MoveStaticFile(old_static_path, new_static_path) ) if( MoveStaticFile(old_static_path, new_static_path) )
{ {
if( db->EditFileById(item, item.id) != WINIX_ERR_OK ) //if( db->EditFileById(item, item.id) != WINIX_ERR_OK )
if( !item.update(false, true) )
{ {
log << log1 << "Mv: cannot move static file (database problem)" << logend; log << log1 << "Mv: cannot move static file (database problem)" << logend;
slog << logerror << T("internal_error") << logend; slog << logerror << T("internal_error") << logend;
return; return;
} }
if( item.has_thumb ) if( item.item_content.file_has_thumb )
MoveStaticFile(old_static_thumb_path, new_static_thumb_path); MoveStaticFile(old_static_thumb_path, new_static_thumb_path);
} }
} }
@ -294,8 +306,17 @@ void Mv::MoveFilesPrepareTreeGo(const Item & src_dir)
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) ) for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )
MoveFilesPrepareTreeGo(*(i->second)); MoveFilesPrepareTreeGo(*(i->second));
files_iq.WhereParentId(src_dir.id); //files_iq.WhereParentId(src_dir.id);
db->GetItems(files_item_tab, files_iq); //db->GetItems(files_item_tab, files_iq);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", src_dir.id).
neq(L"type", static_cast<int>(Item::dir)).
get_vector(files_item_tab);
for(size_t i=0 ; i<files_item_tab.size() ; ++i) for(size_t i=0 ; i<files_item_tab.size() ; ++i)
plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]); plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
@ -324,12 +345,21 @@ void Mv::MoveFilesTree(const Item & dir)
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) ) for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )
MoveFilesTree(*(i->second)); MoveFilesTree(*(i->second));
files_iq.WhereParentId(dir.id); morm::Finder<Item> finder(model_connector);
db->GetItems(files_item_tab, files_iq);
finder.
select().
where().
eq(L"parent_id", dir.id).
neq(L"type", static_cast<int>(Item::dir)).
get_vector(files_item_tab);
//files_iq.WhereParentId(dir.id);
//db->GetItems(files_item_tab, files_iq);
for(size_t i=0 ; i<files_item_tab.size() ; ++i) for(size_t i=0 ; i<files_item_tab.size() ; ++i)
{ {
if( files_item_tab[i].file_type != WINIX_ITEM_FILETYPE_NONE ) if( files_item_tab[i].item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
{ {
plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]); plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
MoveStaticFile(files_item_tab[i]); MoveStaticFile(files_item_tab[i]);
@ -370,9 +400,8 @@ bool Mv::MoveDir(Item & src_dir, std::vector<Item*> & dst_dir_tab, const std::ws
functions->PrepareUrl(src_dir); functions->PrepareUrl(src_dir);
} }
Error status = db->EditParentUrlById(src_dir, src_dir.id); //Error status = db->EditParentUrlById(src_dir, src_dir.id);
if( src_dir.update(true, false) )
if( status == WINIX_ERR_OK )
{ {
log << log3 << "Mv: directory: " << old_url << " was moved to: "; log << log3 << "Mv: directory: " << old_url << " was moved to: ";
system->dirs.LogDir(dst_dir_tab); system->dirs.LogDir(dst_dir_tab);
@ -499,9 +528,9 @@ bool Mv::MoveFileOrSymlink(Item & src_file, std::vector<Item*> & dst_dir_tab, co
} }
src_file.parent_id = dst_dir_tab.back()->id; src_file.parent_id = dst_dir_tab.back()->id;
Error status = db->EditParentUrlById(src_file, src_file.id);
if( status == WINIX_ERR_OK ) //Error status = db->EditParentUrlById(src_file, src_file.id);
if( src_file.update(true, false) )
{ {
if( src_file.type == Item::file ) if( src_file.type == Item::file )
log << log3 << "Mv: file: "; log << log3 << "Mv: file: ";
@ -512,7 +541,7 @@ bool Mv::MoveFileOrSymlink(Item & src_file, std::vector<Item*> & dst_dir_tab, co
system->dirs.LogDir(dst_dir_tab); system->dirs.LogDir(dst_dir_tab);
log << src_file.url << logend; log << src_file.url << logend;
if( src_file.file_type != WINIX_ITEM_FILETYPE_NONE ) if( src_file.item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
MoveStaticFile(src_file); MoveStaticFile(src_file);
plugin->Call(WINIX_FILE_MOVED, &src_file); plugin->Call(WINIX_FILE_MOVED, &src_file);
@ -604,13 +633,22 @@ bool Mv::MoveFileOrSymlink2(Item & src_file, const std::wstring & dst_path, bool
// private // private
void Mv::MoveAllFilesFromDir(Item & src_dir, std::vector<Item*> & dst_dir_tab, bool check_access) void Mv::MoveAllFilesFromDir(Item & src_dir, std::vector<Item*> & dst_dir_tab, bool check_access)
{ {
content_dir_iq.WhereParentId(src_dir.id); // content_dir_iq.WhereParentId(src_dir.id);
db->GetItems(item_tab, content_dir_iq); // db->GetItems(item_tab, content_dir_iq);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", src_dir.id).
get_vector(item_tab);
out_filename.clear(); out_filename.clear();
for(size_t i=0 ; i<item_tab.size() ; ++i) for(size_t i=0 ; i<item_tab.size() ; ++i)
{ {
if( check_access && !system->CanRemoveRenameChild(src_dir, item_tab[i].user_id) ) if( check_access && !system->CanRemoveRenameChild(src_dir, item_tab[i].item_content.user_id) )
{ {
log << log1 << "Mv: permission denied to: " << src_dir.url << logend; log << log1 << "Mv: permission denied to: " << src_dir.url << logend;
slog << logerror << T("mv_permission_denied_to") << ": " << src_dir.url << logend; slog << logerror << T("mv_permission_denied_to") << ": " << src_dir.url << logend;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -95,10 +95,10 @@ private:
// for files/symlinks in a directory // for files/symlinks in a directory
std::vector<Item> files_item_tab; std::vector<Item> files_item_tab;
DbItemQuery files_iq; //DbItemQuery files_iq;
// for moving content of a directory (all dirs/files/symlinks) // for moving content of a directory (all dirs/files/symlinks)
DbItemQuery content_dir_iq; //DbItemQuery content_dir_iq;
std::vector<Item> item_tab; std::vector<Item> item_tab;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -78,7 +78,7 @@ return true;
bool PrivChanger::ChangeOwner(Item & item, long user_id, long group_id) bool PrivChanger::ChangeOwner(Item & item, long user_id, long group_id)
{ {
if( user_id!=item.user_id || group_id!=item.group_id ) if( user_id!=item.item_content.user_id || group_id!=item.item_content.group_id )
{ {
if( !system->CanChangeUser(item, user_id) ) if( !system->CanChangeUser(item, user_id) )
{ {
@ -93,8 +93,8 @@ bool PrivChanger::ChangeOwner(Item & item, long user_id, long group_id)
} }
} }
item.user_id = user_id; item.item_content.user_id = user_id;
item.group_id = group_id; item.item_content.group_id = group_id;
return true; return true;
} }
@ -103,7 +103,7 @@ return true;
bool PrivChanger::ChangePrivileges(Item & item, int privileges) bool PrivChanger::ChangePrivileges(Item & item, int privileges)
{ {
if( privileges != item.privileges ) if( privileges != item.item_content.privileges )
{ {
if( !system->CanChangePrivileges(item, privileges) ) if( !system->CanChangePrivileges(item, privileges) )
{ {
@ -112,7 +112,7 @@ bool PrivChanger::ChangePrivileges(Item & item, int privileges)
} }
} }
item.privileges = privileges; item.item_content.privileges = privileges;
return true; return true;
} }
@ -133,7 +133,11 @@ void PrivChanger::ChangePriv(Item & item, long user_id, long group_id, int privi
return; return;
} }
cur->request->status = db->EditPrivById(item, item.id); //cur->request->status = db->EditPrivById(item, item.id);
if( !item.update(false, true) )
{
// IMPROVEME put some log here, and slog too
}
} }
@ -197,16 +201,24 @@ Item * root = 0;
void PrivChanger::PrivFilesInDir(long parent_id) void PrivChanger::PrivFilesInDir(long parent_id)
{ {
DbItemQuery iq; // DbItemQuery iq;
//
// iq.SetAll(false, false);
// iq.sel_user_id = iq.sel_group_id = iq.sel_guest_name = iq.sel_privileges = iq.sel_url = true;
//
// iq.WhereParentId(parent_id);
// iq.WhereType(Item::dir, false);
iq.SetAll(false, false); morm::Finder<Item> finder(model_connector);
iq.sel_user_id = iq.sel_group_id = iq.sel_guest_name = iq.sel_privileges = iq.sel_url = true;
iq.WhereParentId(parent_id); finder.
iq.WhereType(Item::dir, false); select().
where().
db->GetItems(cur->request->item_tab, iq); eq(L"parent_id", parent_id).
neq(L"type", static_cast<int>(Item::dir)).
get_vector(cur->request->item_tab);
//db->GetItems(cur->request->item_tab, iq);
std::vector<Item>::iterator i = cur->request->item_tab.begin(); std::vector<Item>::iterator i = cur->request->item_tab.begin();

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2012-2014, Tomasz Sowa * Copyright (c) 2012-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -48,7 +48,7 @@ namespace Fun
Pw::Pw() Pw::Pw()
{ {
fun.url = L"pw"; fun.url = L"pw";
fun.privileges = 07000; fun.item_content.privileges = 07000;
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -47,7 +47,7 @@ namespace Fun
Reload::Reload() Reload::Reload()
{ {
fun.url = L"reload"; fun.url = L"reload";
fun.privileges = 07000; fun.item_content.privileges = 07000;
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -80,7 +80,7 @@ bool Rm::HasAccessToDir(const Item & dir, bool only_content)
// ops, there is no a parent dir // ops, there is no a parent dir
return false; return false;
if( !system->CanRemoveRenameChild(*last_but_one_dir, dir.user_id) ) if( !system->CanRemoveRenameChild(*last_but_one_dir, dir.item_content.user_id) )
return false; return false;
} }
@ -104,7 +104,7 @@ bool res = false;
if( cur->request->is_item ) if( cur->request->is_item )
{ {
res = system->CanRemoveRenameChild(*cur->request->dir_tab.back(), cur->request->item.user_id); res = system->CanRemoveRenameChild(*cur->request->dir_tab.back(), cur->request->item.item_content.user_id);
} }
else else
{ {
@ -131,16 +131,16 @@ return res;
void Rm::Prepare() void Rm::Prepare()
{ {
// selecting files and symlinks (without directories) // selecting files and symlinks (without directories)
content_dir_iq.SetAll(false, false); // content_dir_iq.SetAll(false, false);
content_dir_iq.sel_parent_id = true; // content_dir_iq.sel_parent_id = true;
content_dir_iq.sel_type = true; // content_dir_iq.sel_type = true;
content_dir_iq.sel_url = true; // content_dir_iq.sel_url = true;
content_dir_iq.sel_file = true; // content_dir_iq.sel_file = true;
content_dir_iq.sel_user_id = true; // content_dir_iq.sel_user_id = true;
content_dir_iq.sel_group_id = true; // content_dir_iq.sel_group_id = true;
content_dir_iq.sel_privileges = true; // content_dir_iq.sel_privileges = true;
content_dir_iq.sel_meta = true; // content_dir_iq.sel_meta = true;
content_dir_iq.WhereType(Item::dir, false); // content_dir_iq.WhereType(Item::dir, false);
} }
@ -166,7 +166,7 @@ void Rm::RemoveStaticFile(const Item & item)
{ {
RemoveStaticFile(path); RemoveStaticFile(path);
if( item.has_thumb && system->MakeFilePath(item, path, true) ) if( item.item_content.file_has_thumb && system->MakeFilePath(item, path, true) )
RemoveStaticFile(path); RemoveStaticFile(path);
} }
else else
@ -190,7 +190,8 @@ bool Rm::RemoveFile(Item & item)
{ {
plugin->Call(WINIX_FILE_PREPARE_TO_REMOVE, &item); plugin->Call(WINIX_FILE_PREPARE_TO_REMOVE, &item);
if( db->DelItem(item) == WINIX_ERR_OK ) //if( db->DelItem(item) == WINIX_ERR_OK )
if( item.remove() )
{ {
if( item.type == Item::file ) if( item.type == Item::file )
log << log2 << "Rm: deleted file: "; log << log2 << "Rm: deleted file: ";
@ -201,7 +202,7 @@ bool Rm::RemoveFile(Item & item)
TemplatesFunctions::pattern_cacher.DeletePattern(item); TemplatesFunctions::pattern_cacher.DeletePattern(item);
if( item.file_type != WINIX_ITEM_FILETYPE_NONE ) if( item.item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
RemoveStaticFile(item); RemoveStaticFile(item);
plugin->Call(WINIX_FILE_REMOVED, &item); plugin->Call(WINIX_FILE_REMOVED, &item);
@ -230,7 +231,7 @@ bool Rm::RemoveFileOrSymlink(Item & item, bool check_access)
// if there is not 'dir' directory then we can simply remove 'item' // if there is not 'dir' directory then we can simply remove 'item'
if( dir ) if( dir )
{ {
if( !system->CanRemoveRenameChild(*dir, item.user_id) ) if( !system->CanRemoveRenameChild(*dir, item.item_content.user_id) )
{ {
log << log1 << "Rm: permission denied to remove: " << item.url << ", id: " << item.id << logend; log << log1 << "Rm: permission denied to remove: " << item.url << ", id: " << item.id << logend;
slog << logerror << T("rm_permission_denied_to") << ": " << item.url << logend; slog << logerror << T("rm_permission_denied_to") << ": " << item.url << logend;
@ -248,18 +249,27 @@ bool Rm::RemoveFileOrSymlink(long item_id, bool check_access)
bool result = false; bool result = false;
// selecting files, symlinks and directories // selecting files, symlinks and directories
rm_by_id_iq.SetAll(false, false); // rm_by_id_iq.SetAll(false, false);
rm_by_id_iq.sel_parent_id = true; // rm_by_id_iq.sel_parent_id = true;
rm_by_id_iq.sel_type = true; // rm_by_id_iq.sel_type = true;
rm_by_id_iq.sel_url = true; // rm_by_id_iq.sel_url = true;
rm_by_id_iq.sel_file = true; // rm_by_id_iq.sel_file = true;
rm_by_id_iq.sel_user_id = true; // rm_by_id_iq.sel_user_id = true;
rm_by_id_iq.sel_group_id = true; // rm_by_id_iq.sel_group_id = true;
rm_by_id_iq.sel_privileges = true; // rm_by_id_iq.sel_privileges = true;
rm_by_id_iq.sel_meta = true; // rm_by_id_iq.sel_meta = true;
rm_by_id_iq.WhereId(item_id); // rm_by_id_iq.WhereId(item_id);
if( db->GetItem(rm_by_id_item, rm_by_id_iq) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
rm_by_id_item = finder.
select().
where().
eq(L"id", item_id).
get();
//if( db->GetItem(rm_by_id_item, rm_by_id_iq) == WINIX_ERR_OK )
if( rm_by_id_item.found() )
{ {
if( rm_by_id_item.type == Item::file || rm_by_id_item.type == Item::symlink ) if( rm_by_id_item.type == Item::file || rm_by_id_item.type == Item::symlink )
{ {
@ -282,18 +292,27 @@ bool Rm::RemoveItemById(long item_id, bool check_access)
bool result = false; bool result = false;
// selecting files, symlinks and directories // selecting files, symlinks and directories
rm_by_id_iq.SetAll(false, false); // rm_by_id_iq.SetAll(false, false);
rm_by_id_iq.sel_parent_id = true; // rm_by_id_iq.sel_parent_id = true;
rm_by_id_iq.sel_type = true; // rm_by_id_iq.sel_type = true;
rm_by_id_iq.sel_url = true; // rm_by_id_iq.sel_url = true;
rm_by_id_iq.sel_file = true; // rm_by_id_iq.sel_file = true;
rm_by_id_iq.sel_user_id = true; // rm_by_id_iq.sel_user_id = true;
rm_by_id_iq.sel_group_id = true; // rm_by_id_iq.sel_group_id = true;
rm_by_id_iq.sel_privileges = true; // rm_by_id_iq.sel_privileges = true;
rm_by_id_iq.sel_meta = true; // rm_by_id_iq.sel_meta = true;
rm_by_id_iq.WhereId(item_id); // rm_by_id_iq.WhereId(item_id);
if( db->GetItem(rm_by_id_item, rm_by_id_iq) == WINIX_ERR_OK ) morm::Finder<Item> finder(model_connector);
rm_by_id_item = finder.
select().
where().
eq(L"id", item_id).
get();
//if( db->GetItem(rm_by_id_item, rm_by_id_iq) == WINIX_ERR_OK )
if( rm_by_id_item.found() )
{ {
if( rm_by_id_item.type == Item::dir ) if( rm_by_id_item.type == Item::dir )
{ {
@ -341,8 +360,16 @@ return result;
bool Rm::RemoveDirFiles(long dir_id, bool check_access) bool Rm::RemoveDirFiles(long dir_id, bool check_access)
{ {
content_dir_iq.WhereParentId(dir_id); // content_dir_iq.WhereParentId(dir_id);
db->GetItems(content_item_tab, content_dir_iq); // db->GetItems(content_item_tab, content_dir_iq);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", dir_id).
get_vector(content_item_tab);
size_t removed = 0; size_t removed = 0;
@ -362,7 +389,7 @@ void Rm::RemoveCurrentDir(Item * parent_dir, Item * current_dir, bool check_acce
{ {
if( check_access ) if( check_access )
{ {
if( !parent_dir || !system->CanRemoveRenameChild(*parent_dir, current_dir->user_id) ) if( !parent_dir || !system->CanRemoveRenameChild(*parent_dir, current_dir->item_content.user_id) )
{ {
log << log1 << "Rm: permission denied to directory: " << current_dir->url << logend; log << log1 << "Rm: permission denied to directory: " << current_dir->url << logend;
slog << logerror << T("rm_permission_denied_to") << ": " << current_dir->url << logend; slog << logerror << T("rm_permission_denied_to") << ": " << current_dir->url << logend;
@ -372,7 +399,8 @@ void Rm::RemoveCurrentDir(Item * parent_dir, Item * current_dir, bool check_acce
plugin->Call(WINIX_DIR_PREPARE_TO_REMOVE, current_dir); plugin->Call(WINIX_DIR_PREPARE_TO_REMOVE, current_dir);
if( db->DelDirById(current_dir->id) == WINIX_ERR_OK ) //if( db->DelDirById(current_dir->id) == WINIX_ERR_OK )
if( current_dir->remove() )
{ {
long dir_id = current_dir->id; long dir_id = current_dir->id;
old_url = current_dir->url; old_url = current_dir->url;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -74,7 +74,7 @@ public:
private: private:
// for deleting content in a directory (files and symlinks) // for deleting content in a directory (files and symlinks)
DbItemQuery content_dir_iq; //DbItemQuery content_dir_iq;
std::vector<Item> content_item_tab; std::vector<Item> content_item_tab;
std::wstring path; std::wstring path;
@ -82,7 +82,7 @@ private:
std::wstring old_url; std::wstring old_url;
// for removing an item by id // for removing an item by id
DbItemQuery rm_by_id_iq; //DbItemQuery rm_by_id_iq;
Item rm_by_id_item; Item rm_by_id_item;
std::vector<Item*> rm_path_dir_tab; std::vector<Item*> rm_path_dir_tab;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2018, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -65,9 +65,18 @@ bool Sort::HasAccess()
void Sort::GetDirContent() void Sort::GetDirContent()
{ {
iq.sel_content = false; // iq.sel_content = false;
iq.WhereParentId(cur->request->dir_tab.back()->id); // iq.WhereParentId(cur->request->dir_tab.back()->id);
db->GetItems(cur->request->item_tab, iq); // db->GetItems(cur->request->item_tab, iq);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", cur->request->dir_tab.back()->id).
get_vector(cur->request->item_tab);
system->CheckWriteAccessToItems(cur->request->item_tab); system->CheckWriteAccessToItems(cur->request->item_tab);
} }
@ -127,7 +136,8 @@ void Sort::UpdateSortIndex(Item & item, int sort_index)
{ {
item.sort_index = sort_index; item.sort_index = sort_index;
if( db->EditSortIndexItemById(item.id, sort_index) == WINIX_ERR_OK ) //if( db->EditSortIndexItemById(item.id, sort_index) == WINIX_ERR_OK )
if( item.update(false, false) )
{ {
log << log2 log << log2
<< "Sort: updated sort index, item_id=" << item.id << "Sort: updated sort index, item_id=" << item.id

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2018, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -57,7 +57,7 @@ public:
private: private:
DbItemQuery iq; //DbItemQuery iq;
std::vector<size_t> item_tab; // indexes to cur->request->item_tab std::vector<size_t> item_tab; // indexes to cur->request->item_tab
struct SortPair struct SortPair

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -76,7 +76,8 @@ void Subject::EditDirSubject()
Item & dir = *cur->request->dir_tab.back(); Item & dir = *cur->request->dir_tab.back();
cur->request->PostVar(L"subject", dir.subject); cur->request->PostVar(L"subject", dir.subject);
db->EditSubjectById(dir, dir.id); dir.update(false, false);
//db->EditSubjectById(dir, dir.id);
// !! IMPROVE ME // !! IMPROVE ME
// we need something like WINIX_DIR_CHANGED message // we need something like WINIX_DIR_CHANGED message
@ -90,7 +91,8 @@ void Subject::EditDirSubject()
void Subject::EditFileSubject() void Subject::EditFileSubject()
{ {
cur->request->PostVar(L"subject", cur->request->item.subject); cur->request->PostVar(L"subject", cur->request->item.subject);
db->EditSubjectById(cur->request->item, cur->request->item.id); cur->request->item.update(false, false);
//db->EditSubjectById(cur->request->item, cur->request->item.id);
plugin->Call(WINIX_FILE_CHANGED, &cur->request->item); plugin->Call(WINIX_FILE_CHANGED, &cur->request->item);

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2016, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -122,11 +122,11 @@ void Template::ChangeTemplate(Item & item)
{ {
if( html_template != item.html_template ) if( html_template != item.html_template )
{ {
cur->request->status = db->EditTemplateItemById(item.id, html_template); item.html_template = html_template;
if( cur->request->status == WINIX_ERR_OK ) //cur->request->status = db->EditTemplateItemById(item.id, html_template);
if( item.update(false, false) )
{ {
item.html_template = html_template;
PutLog(item); PutLog(item);
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2018, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -154,25 +154,32 @@ void Upload::UploadFile(Item & item, const std::wstring & tmp_filename)
{ {
if( UploadSaveStaticFile(item, tmp_filename) ) if( UploadSaveStaticFile(item, tmp_filename) )
{ {
cur->request->status = db->EditFileById(item, item.id); //cur->request->status = db->EditFileById(item, item.id);
if( item.update(false, true) )
plugin->Call(WINIX_FILE_ADDED, &item);
if( item.file_type == WINIX_ITEM_FILETYPE_IMAGE )
{ {
if( config->image_resize ) plugin->Call(WINIX_FILE_ADDED, &item);
ResizeImage(item);
if( config->create_thumb ) if( item.item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE )
CreateThumb(item); {
if( config->image_resize )
ResizeImage(item);
if( config->create_thumb )
CreateThumb(item);
}
if( is_jquery_upload )
cur->request->item_tab.push_back(item);
}
else
{
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
} }
if( is_jquery_upload )
cur->request->item_tab.push_back(item);
} }
else else
{ {
db->DelItem(item); item.remove();
//db->DelItem(item);
} }
} }
} }
@ -208,7 +215,7 @@ void Upload::UploadMulti()
cur->request->item.Clear(); // clearing and setting date cur->request->item.Clear(); // clearing and setting date
cur->request->item.parent_id = cur->request->dir_tab.back()->id; cur->request->item.parent_id = cur->request->dir_tab.back()->id;
cur->request->item.type = Item::file; cur->request->item.type = Item::file;
cur->request->item.privileges = system->NewFilePrivileges(); cur->request->item.item_content.privileges = system->NewFilePrivileges();
functions->SetUser(cur->request->item); functions->SetUser(cur->request->item);
PostFileTab::iterator i = cur->request->post_file_tab.begin(); PostFileTab::iterator i = cur->request->post_file_tab.begin();
@ -219,8 +226,8 @@ void Upload::UploadMulti()
cur->request->item.subject = file_name; cur->request->item.subject = file_name;
cur->request->item.url = file_name; cur->request->item.url = file_name;
cur->request->item.file_type = SelectFileType(file_name); cur->request->item.item_content.file_type = SelectFileType(file_name);
cur->request->item.file_size = i->second.file_size; cur->request->item.item_content.file_size = i->second.file_size;
functions->PrepareUrl(cur->request->item); functions->PrepareUrl(cur->request->item);
UploadFile(cur->request->item, i->second.tmp_filename); UploadFile(cur->request->item, i->second.tmp_filename);
@ -243,13 +250,13 @@ void Upload::UploadSingle()
functions->ReadItem(cur->request->item, Item::file); // ReadItem() changes the url if it is empty functions->ReadItem(cur->request->item, Item::file); // ReadItem() changes the url if it is empty
functions->SetUser(cur->request->item); functions->SetUser(cur->request->item);
cur->request->item.privileges = system->NewFilePrivileges(); cur->request->item.item_content.privileges = system->NewFilePrivileges();
PostFile & post_file = cur->request->post_file_tab.begin()->second; PostFile & post_file = cur->request->post_file_tab.begin()->second;
const wchar_t * file_name = post_file.filename.c_str(); const wchar_t * file_name = post_file.filename.c_str();
cur->request->item.file_type = SelectFileType(file_name); cur->request->item.item_content.file_type = SelectFileType(file_name);
cur->request->item.file_size = post_file.file_size; cur->request->item.item_content.file_size = post_file.file_size;
if( !has_subject ) if( !has_subject )
cur->request->item.subject = file_name; cur->request->item.subject = file_name;
@ -305,7 +312,7 @@ void Upload::CreateAnswer()
PT::Space & file = files.AddSpace(L""); PT::Space & file = files.AddSpace(L"");
file.Add(L"name", req.item_tab[i].url); file.Add(L"name", req.item_tab[i].url);
file.Add(L"size", req.item_tab[i].file_size); file.Add(L"size", req.item_tab[i].item_content.file_size);
std::wstring & link = file.Add(L"url", L""); std::wstring & link = file.Add(L"url", L"");
system->CreateItemLink(req.item_tab[i], link); system->CreateItemLink(req.item_tab[i], link);
@ -315,11 +322,11 @@ void Upload::CreateAnswer()
file.Add(L"deleteType", L"POST"); file.Add(L"deleteType", L"POST");
if( req.item_tab[i].file_type == WINIX_ITEM_FILETYPE_IMAGE ) if( req.item_tab[i].item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE )
{ {
std::wstring & thumb = file.Add(L"thumbnailUrl", link); std::wstring & thumb = file.Add(L"thumbnailUrl", link);
if( req.item_tab[i].has_thumb ) if( req.item_tab[i].item_content.file_has_thumb )
thumb += L"/-/thumb"; thumb += L"/-/thumb";
} }
@ -342,12 +349,22 @@ void Upload::MakeGet()
{ {
if( cur->request->IsParam(L"jquery_upload") ) if( cur->request->IsParam(L"jquery_upload") )
{ {
query.Clear(); // query.Clear();
query.WhereParentId(cur->request->dir_tab.back()->id); // query.WhereParentId(cur->request->dir_tab.back()->id);
query.WhereType(Item::file); // query.WhereType(Item::file);
query.WhereFileType(WINIX_ITEM_FILETYPE_NONE, false); // query.WhereFileType(WINIX_ITEM_FILETYPE_NONE, false);
db->GetItems(cur->request->item_tab, query); morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", cur->request->dir_tab.back()->id).
eq(L"type", static_cast<int>(Item::file)).
neq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE).
get_vector(cur->request->item_tab);
//db->GetItems(cur->request->item_tab, query);
CreateAnswer(); CreateAnswer();
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -59,7 +59,7 @@ public:
private: private:
std::wstring path; std::wstring path;
DbItemQuery query; //DbItemQuery query;
bool is_jquery_upload; bool is_jquery_upload;
// this object is used in App at the end of a request // this object is used in App at the end of a request

View File

@ -4,10 +4,10 @@ main.o: ../../../winix/winixd/core/app.h
main.o: ../../../winix/winixd/core/sessionmanager.h main.o: ../../../winix/winixd/core/sessionmanager.h
main.o: ../../../winix/winixd/core/sessioncontainer.h main.o: ../../../winix/winixd/core/sessioncontainer.h
main.o: ../../../winix/winixd/core/session.h main.o: ../../../winix/winixd/core/session.h
main.o: ../../../winix/winixd/core/item.h ../../../pikotools/space/space.h main.o: ../../../winix/winixd/core/error.h ../../../winix/winixd/core/user.h
main.o: ../../../pikotools/space/space.h
main.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h main.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h
main.o: ../../../pikotools/convert/inttostr.h main.o: ../../../pikotools/convert/inttostr.h
main.o: ../../../winix/winixd/core/error.h ../../../winix/winixd/core/user.h
main.o: ../../../winix/winixd/core/plugindata.h main.o: ../../../winix/winixd/core/plugindata.h
main.o: ../../../winix/winixd/core/rebus.h main.o: ../../../winix/winixd/core/rebus.h
main.o: ../../../winix/winixd/core/winixbase.h main.o: ../../../winix/winixd/core/winixbase.h
@ -35,6 +35,16 @@ main.o: ../../../pikotools/convert/patternreplacer.h
main.o: ../../../pikotools/convert/strtoint.h main.o: ../../../pikotools/convert/strtoint.h
main.o: ../../../pikotools/convert/text.h ../../../winix/winixd/core/ipban.h main.o: ../../../pikotools/convert/text.h ../../../winix/winixd/core/ipban.h
main.o: ../../../winix/winixd/core/cur.h ../../../winix/winixd/core/request.h main.o: ../../../winix/winixd/core/cur.h ../../../winix/winixd/core/request.h
main.o: ../../../winix/winixd/models/item.h ../../../morm/src/model.h
main.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h
main.o: ../../../morm/src/dbconnector.h ../../../morm/src/queryresult.h
main.o: ../../../morm/src/flatconnector.h ../../../morm/src/dbexpression.h
main.o: ../../../morm/src/baseexpression.h ../../../morm/src/morm_types.h
main.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h
main.o: ../../../morm/src/cursorhelper.h ../../../morm/src/finderhelper.h
main.o: ../../../morm/src/fieldvaluehelper.h
main.o: ../../../morm/src/flatexpression.h
main.o: ../../../winix/winixd/models/itemcontent.h
main.o: ../../../winix/winixd/core/config.h main.o: ../../../winix/winixd/core/config.h
main.o: ../../../winix/winixd/templates/htmltextstream.h main.o: ../../../winix/winixd/templates/htmltextstream.h
main.o: ../../../winix/winixd/core/textstream.h main.o: ../../../winix/winixd/core/textstream.h
@ -44,15 +54,8 @@ main.o: ../../../winix/winixd/core/winixmodel.h
main.o: ../../../winix/winixd/core/winixbase.h main.o: ../../../winix/winixd/core/winixbase.h
main.o: ../../../winix/winixd/core/plugin.h main.o: ../../../winix/winixd/core/plugin.h
main.o: ../../../winix/winixd/core/pluginmsg.h ../../../morm/src/morm.h main.o: ../../../winix/winixd/core/pluginmsg.h ../../../morm/src/morm.h
main.o: ../../../morm/src/morm_types.h ../../../morm/src/model.h main.o: ../../../morm/src/finder.h ../../../morm/src/cursor.h
main.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h main.o: ../../../morm/src/jsonexpression.h
main.o: ../../../morm/src/dbconnector.h ../../../morm/src/queryresult.h
main.o: ../../../morm/src/flatconnector.h ../../../morm/src/dbexpression.h
main.o: ../../../morm/src/baseexpression.h ../../../morm/src/modelenv.h
main.o: ../../../morm/src/modeldata.h ../../../morm/src/cursorhelper.h
main.o: ../../../morm/src/finderhelper.h ../../../morm/src/fieldvaluehelper.h
main.o: ../../../morm/src/flatexpression.h ../../../morm/src/finder.h
main.o: ../../../morm/src/cursor.h ../../../morm/src/jsonexpression.h
main.o: ../../../morm/src/postgresqlexpression.h main.o: ../../../morm/src/postgresqlexpression.h
main.o: ../../../morm/src/jsonconnector.h main.o: ../../../morm/src/jsonconnector.h
main.o: ../../../morm/src/postgresqlconnector.h main.o: ../../../morm/src/postgresqlconnector.h
@ -68,7 +71,6 @@ main.o: ../../../winix/winixd/db/dbconn.h
main.o: ../../../winix/winixd/db/dbtextstream.h main.o: ../../../winix/winixd/db/dbtextstream.h
main.o: ../../../winix/winixd/core/error.h main.o: ../../../winix/winixd/core/error.h
main.o: ../../../winix/winixd/db/dbitemquery.h main.o: ../../../winix/winixd/db/dbitemquery.h
main.o: ../../../winix/winixd/core/item.h
main.o: ../../../winix/winixd/db/dbitemcolumns.h main.o: ../../../winix/winixd/db/dbitemcolumns.h
main.o: ../../../winix/winixd/core/user.h ../../../winix/winixd/core/group.h main.o: ../../../winix/winixd/core/user.h ../../../winix/winixd/core/group.h
main.o: ../../../winix/winixd/core/dircontainer.h main.o: ../../../winix/winixd/core/dircontainer.h
@ -91,10 +93,10 @@ main.o: ../../../winix/winixd/templates/patterns.h
main.o: ../../../winix/winixd/templates/locale.h main.o: ../../../winix/winixd/templates/locale.h
main.o: ../../../winix/winixd/templates/localefilter.h ../../../ezc/src/ezc.h main.o: ../../../winix/winixd/templates/localefilter.h ../../../ezc/src/ezc.h
main.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h main.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
main.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h main.o: ../../../ezc/src/item.h ../../../ezc/src/cache.h
main.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h main.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
main.o: ../../../ezc/src/pattern.h ../../../ezc/src/expressionparser.h main.o: ../../../ezc/src/objects.h ../../../ezc/src/pattern.h
main.o: ../../../ezc/src/patternparser.h main.o: ../../../ezc/src/expressionparser.h ../../../ezc/src/patternparser.h
main.o: ../../../winix/winixd/notify/notifythread.h main.o: ../../../winix/winixd/notify/notifythread.h
main.o: ../../../winix/winixd/core/basethread.h main.o: ../../../winix/winixd/core/basethread.h
main.o: ../../../winix/winixd/notify/templatesnotify.h main.o: ../../../winix/winixd/notify/templatesnotify.h

24
winixd/models/Makefile Normal file
View File

@ -0,0 +1,24 @@
include Makefile.o.dep
current_path := $(shell pwd)
global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR))
winix_include_paths = -I$(global_relative_working_dir)/winix/winixd -I$(global_relative_working_dir)/ezc/src -I$(global_relative_working_dir)/tito/src -I$(global_relative_working_dir)/morm/src -I$(global_relative_working_dir)/pikotools
all: $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(winix_include_paths) $<
depend:
makedepend -Y. $(winix_include_paths) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
include Makefile.dep

View File

@ -0,0 +1,66 @@
# DO NOT DELETE
item.o: ../../../winix/winixd/models/item.h ../../../morm/src/model.h
item.o: ../../../pikotools/textstream/textstream.h
item.o: ../../../pikotools/space/space.h
item.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h
item.o: ../../../pikotools/convert/inttostr.h
item.o: ../../../pikotools/membuffer/membuffer.h
item.o: ../../../pikotools/textstream/types.h
item.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h
item.o: ../../../morm/src/dbconnector.h ../../../pikotools/log/log.h
item.o: ../../../pikotools/log/filelog.h ../../../morm/src/queryresult.h
item.o: ../../../morm/src/flatconnector.h ../../../morm/src/dbexpression.h
item.o: ../../../morm/src/baseexpression.h ../../../morm/src/morm_types.h
item.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h
item.o: ../../../morm/src/cursorhelper.h ../../../morm/src/finderhelper.h
item.o: ../../../morm/src/fieldvaluehelper.h
item.o: ../../../morm/src/flatexpression.h
item.o: ../../../winix/winixd/models/itemcontent.h ../../../morm/src/finder.h
item.o: ../../../pikotools/utf8/utf8.h ../../../morm/src/cursor.h
itemcontent.o: ../../../winix/winixd/models/itemcontent.h
itemcontent.o: ../../../pikotools/space/space.h
itemcontent.o: ../../../pikotools/textstream/types.h
itemcontent.o: ../../../pikotools/date/date.h
itemcontent.o: ../../../pikotools/convert/inttostr.h
itemcontent.o: ../../../morm/src/model.h
itemcontent.o: ../../../pikotools/textstream/textstream.h
itemcontent.o: ../../../pikotools/membuffer/membuffer.h
itemcontent.o: ../../../pikotools/textstream/types.h
itemcontent.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h
itemcontent.o: ../../../morm/src/dbconnector.h ../../../pikotools/log/log.h
itemcontent.o: ../../../pikotools/log/filelog.h
itemcontent.o: ../../../morm/src/queryresult.h
itemcontent.o: ../../../morm/src/flatconnector.h
itemcontent.o: ../../../morm/src/dbexpression.h
itemcontent.o: ../../../morm/src/baseexpression.h
itemcontent.o: ../../../morm/src/morm_types.h ../../../morm/src/modelenv.h
itemcontent.o: ../../../morm/src/modeldata.h ../../../morm/src/cursorhelper.h
itemcontent.o: ../../../morm/src/finderhelper.h
itemcontent.o: ../../../morm/src/fieldvaluehelper.h
itemcontent.o: ../../../morm/src/flatexpression.h
itemcontent.o: ../../../winix/winixd/core/crypt.h
itemcontent.o: ../../../winix/winixd/core/run.h
itemcontent.o: ../../../winix/winixd/core/winixbase.h
itemcontent.o: ../../../winix/winixd/core/config.h
itemcontent.o: ../../../pikotools/space/spaceparser.h
itemcontent.o: ../../../pikotools/space/space.h
itemcontent.o: ../../../winix/winixd/core/log.h
itemcontent.o: ../../../winix/winixd/core/logmanipulators.h
itemcontent.o: ../../../winix/winixd/core/log.h
itemcontent.o: ../../../winix/winixd/core/synchro.h
itemcontent.o: ../../../winix/winixd/core/filelog.h
itemcontent.o: ../../../winix/winixd/core/lock.h
itemcontent.o: ../../../winix/winixd/core/synchro.h
itemcontent.o: ../../../winix/winixd/core/config.h
itemcontent.o: ../../../winix/winixd/core/user.h
itemcontent.o: ../../../winix/winixd/core/misc.h
itemcontent.o: ../../../winix/winixd/core/requesttypes.h
itemcontent.o: ../../../pikotools/utf8/utf8.h
itemcontent.o: ../../../winix/winixd/core/winix_const.h
itemcontent.o: ../../../pikotools/convert/convert.h
itemcontent.o: ../../../pikotools/convert/inttostr.h
itemcontent.o: ../../../pikotools/convert/patternreplacer.h
itemcontent.o: ../../../pikotools/convert/strtoint.h
itemcontent.o: ../../../pikotools/convert/text.h
itemcontent.o: ../../../pikotools/convert/misc.h

View File

@ -0,0 +1 @@
o = item.o itemcontent.o

231
winixd/models/item.cpp Normal file
View File

@ -0,0 +1,231 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "models/item.h"
#include "finder.h"
namespace Winix
{
Item::Item()
{
Clear();
}
void Item::map_fields()
{
int type_helper = static_cast<int>(type);
field(L"id", id, false, false, true);
field(L"parent_id", parent_id);
field(L"type", type_helper);
field(L"url", url);
field(L"subject", subject);
field(L"template", html_template);
field(L"sort_index", sort_index);
//field(L"content_id", content_id);
field(L"content_id", item_content, true, true, true);
// may we should add a method setTypeFromInt(int t)?
type = static_cast<Type>(type_helper);
}
void Item::table_name(PT::TextStream & stream)
{
stream << "core.item";
}
void Item::before_insert()
{
// IMPROVEME if prepare_status is false then update the 'url' with the 'id'
// add a method: update_url()
url_was_prepared_correctly = prepare_url();
}
void Item::after_insert()
{
get_last_sequence(L"core.item_id_seq", id);
if( !url_was_prepared_correctly )
{
// update_url();
// what about an error from update_url()?
}
}
bool Item::update(morm::ModelData * model_data, bool url_was_changed, bool update_whole_tree)
{
bool prepare_url_status = true;
if( url_was_changed )
{
prepare_url_status = prepare_url();
}
bool update_status = morm::Model::update(model_data, update_whole_tree);
if( update_status )
{
if( !prepare_url_status )
{
// IMPROVEME add update_url() method
// set 'url' to the same value as 'id'
//update_status = update_url();
}
}
return update_status;
}
bool Item::update(morm::ModelData & model_data, bool url_was_changed, bool update_whole_tree)
{
return update(&model_data, url_was_changed, update_whole_tree);
}
bool Item::update(bool url_was_changed, bool update_whole_tree)
{
return update(nullptr, url_was_changed, update_whole_tree);
}
void Item::Clear()
{
id = -1;
parent_id = -1;
type = none;
url.clear();
subject.clear();
html_template.clear();
sort_index = 0;
content_id = -1;
item_content.Clear();
// used only when inserting, not saved to the database
url_was_prepared_correctly = true;
}
long Item::calc_items_by_url(long parent_id, const std::wstring & url)
{
morm::Finder<CalcItemsHelper> finder(model_connector);
CalcItemsHelper helper = finder.
prepare_to_select().
raw("select count(id) as size from core.item").
where().
eq(L"parent_id", parent_id).
eq(L"url", url).
get();
return helper.size;
}
bool Item::prepare_url()
{
std::wstring temp_url;
bool is_that_url;
int index = 1;
const int max_index = 99;
wchar_t appendix[20];
size_t appendix_len = sizeof(appendix) / sizeof(wchar_t);
appendix[0] = 0;
// only root dir may not have the url
if( parent_id != -1 && url.empty() )
url = L"empty"; // IMPROVEME move me to locales
do
{
temp_url = url;
temp_url += appendix;
long size = calc_items_by_url(parent_id, temp_url);
if( size > 0 )
{
swprintf(appendix, appendix_len, L"_(%d)", ++index);
is_that_url = true;
}
else
{
url = temp_url;
is_that_url = false;
}
}
while( is_that_url && index <= max_index );
return !is_that_url;
}
void Item::do_migration(morm::ModelConnector * model_connector)
{
return;
///////
morm::Finder<Item> finder(model_connector);
std::list<Item> list = finder.select().where().eq(L"type", static_cast<int>(Item::dir)).eq(L"content_id", -1).get_list();
for(Item & item : list)
{
item.item_content.set_save_mode(morm::Model::DO_INSERT_ON_SAVE);
item.save();
}
}
} // namespace Winix

180
winixd/models/item.h Normal file
View File

@ -0,0 +1,180 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_models_item
#define headerfile_winix_models_item
#include <string>
#include "model.h"
#include "models/itemcontent.h"
namespace Winix
{
// IMPROVEME rename me and move to a better place
class CalcItemsHelper : public morm::Model
{
public:
long size;
void map_fields()
{
field(L"size", size);
}
};
class Item : public morm::Model
{
public:
enum Type
{
dir = 0,
file = 1,
symlink = 2,
none = 1000
};
/*
*
*/
long id;
/*
*
*/
long parent_id;
/*
* may change to int?
*/
Type type;
/*
*
*/
std::wstring url;
/*
*
*/
std::wstring subject;
/*
*
*/
std::wstring html_template;
/*
* sort index used when displaying a group of items
*/
int sort_index;
/*
* may not needed?
* the id is in the ItemContent object
*/
long content_id;
/*
*
*/
ItemContent item_content;
Item();
void map_fields();
void table_name(PT::TextStream & stream);
void before_insert();
void after_insert();
/*
* what about clear() from Model?
*/
void Clear();
bool prepare_url();
/*
* CHECKME
* make sure update(...) methods from Model are not available
*/
bool update(morm::ModelData * model_data, bool url_was_changed, bool update_whole_tree = true);
bool update(morm::ModelData & model_data, bool url_was_changed, bool update_whole_tree = true);
bool update(bool url_was_changed, bool update_whole_tree = true);
// IMPROVEME make the same for save() methods
/*
* IMPROVEME
* when removing we should check whether the item_content.references is zero and them remove it
* in other cases only decrement item_content.references
*
*/
/*
* temporary
*/
static void do_migration(morm::ModelConnector * model_connector);
protected:
bool url_was_prepared_correctly;
long calc_items_by_url(long parent_id, const std::wstring & url);
};
} // namespace Winix
#endif

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -32,9 +32,10 @@
* *
*/ */
#include "item.h" #include "models/itemcontent.h"
#include "misc.h" #include "core/crypt.h"
#include "crypt.h" #include "core/misc.h"
namespace Winix namespace Winix
@ -43,68 +44,114 @@ namespace Winix
Item::Item() ItemContent::ItemContent()
{ {
Clear(); Clear();
} }
// !! IMPROVE ME // IMPROVEME move me to morm
void ItemContent::field(const wchar_t * db_field_name, PT::Space & space)
{
}
void ItemContent::map_fields()
{
int content_raw_type_helper = static_cast<int>(content_raw_type);
int content_parsed_type_helper = static_cast<int>(content_parsed_type);
field(L"id", id, false, false, true);
field(L"references", references);
field(L"user_id", user_id);
field(L"group_id", group_id);
field(L"guest_name", guest_name);
field(L"modification_user_id", modification_user_id);
field(L"privileges", privileges);
field(L"date_creation", date_creation);
field(L"date_modification", date_modification);
field(L"link_to", link_to);
field(L"link_redirect", link_redirect);
field(L"file_path", file_path);
field(L"file_fs", file_fs);
field(L"file_type", file_type);
field(L"file_has_thumb", file_has_thumb);
field(L"file_hash", file_hash);
field(L"file_hash_type", file_hash_type);
field(L"file_size", file_size);
field(L"content_raw", content_raw);
field(L"content_raw_type", content_raw_type_helper);
field(L"content_parsed", content_parsed);
field(L"content_parsed_type", content_parsed_type_helper);
// field(L"meta", meta);
// field(L"meta_admin", meta_admin);
content_raw_type = static_cast<ContentType>(content_raw_type_helper);
content_parsed_type = static_cast<ContentType>(content_parsed_type_helper);
}
void ItemContent::table_name(PT::TextStream & stream)
{
stream << "core.content";
}
void ItemContent::after_insert()
{
get_last_sequence(L"core.content_id_seq", id);
}
// !! IMPROVEME
// now we have Request::start_time and Request::start_date // now we have Request::start_time and Request::start_date
// we can somehow get the current time from the request // we can somehow get the current time from the request
// may setting the date should be completetly removed from here? // may setting the date should be completetly removed from here?
void Item::SetDateToNow() void ItemContent::SetDateToNow()
{ {
date_creation = std::time(0); date_creation = std::time(0);
date_modification = date_creation; date_modification = date_creation;
} }
void Item::SetDateModifyToNow() void ItemContent::SetDateModifyToNow()
{ {
date_modification = std::time(0); date_modification = std::time(0);
} }
void Item::Clear() void ItemContent::Clear()
{ {
id = -1; id = -1;
references = 1;
user_id = -1; user_id = -1;
group_id = -1; group_id = -1;
privileges = 0;
modification_user_id = -1;
guest_name.clear(); guest_name.clear();
modification_user_id = -1;
subject.clear(); privileges = 0;
content.clear();
modify_index = 0;
url.clear();
content_type = ct_formatted_text;
type = none;
parent_id = -1;
link_to.clear(); link_to.clear();
link_redirect = false; link_redirect = false;
content_id = -1;
ref = 1;
file_path.clear(); file_path.clear();
file_fs = -1; file_fs = -1;
file_type = WINIX_ITEM_FILETYPE_NONE; file_type = WINIX_ITEM_FILETYPE_NONE;
hash.clear(); file_has_thumb = false;
hash_type = WINIX_CRYPT_HASH_NONE; file_hash.clear();
file_hash_type = WINIX_CRYPT_HASH_NONE;
file_size = 0; file_size = 0;
has_thumb = false;
html_template.clear();
sort_index = 0; content_raw.clear();
content_raw_type = ct_formatted_text;
content_parsed.clear();
content_parsed_type = ct_formatted_text;
meta.Clear(); meta.Clear();
ameta.Clear(); meta_admin.Clear();
SetDateToNow(); SetDateToNow();
} }
@ -114,14 +161,14 @@ void Item::Clear()
* we're using the HtmlFilter only for those contents * we're using the HtmlFilter only for those contents
* *
*/ */
bool Item::CanContentBeHtmlFiltered(Item::ContentType ct) bool ItemContent::CanContentBeHtmlFiltered(ItemContent::ContentType ct)
{ {
return ct == ct_text || ct == ct_formatted_text || ct == ct_html || ct == ct_bbcode; return ct == ct_text || ct == ct_formatted_text || ct == ct_html || ct == ct_bbcode;
} }
bool Item::CanContentBeHtmlFiltered() bool ItemContent::CanContentBeHtmlFiltered()
{ {
return CanContentBeHtmlFiltered(content_type); return CanContentBeHtmlFiltered(content_raw_type);
} }

244
winixd/models/itemcontent.h Normal file
View File

@ -0,0 +1,244 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_models_itemcontent
#define headerfile_winix_models_itemcontent
#include <string>
#include "space/space.h"
#include "date/date.h"
#include "model.h"
namespace Winix
{
#define WINIX_ITEM_FILETYPE_NONE 0
#define WINIX_ITEM_FILETYPE_IMAGE 1
#define WINIX_ITEM_FILETYPE_DOCUMENT 2
#define WINIX_ITEM_FILETYPE_VIDEO 3
#define WINIX_ITEM_FILETYPE_UNKNOWN 10
class ItemContent : public morm::Model
{
public:
/*
* may we should add ct_none? and this will be default (set in Clear method)
*/
enum ContentType
{
ct_text = 0,
ct_formatted_text,
ct_html,
ct_bbcode,
ct_other, // no auto-formatting is applied
};
/*
* record id
*/
long id;
/*
* how many Items references to this
*/
int references;
/*
* user owner
* -1 means the item was created by a not logged in user and in such a case a 'guest_name' field is set
*/
long user_id;
/*
* group owner
*/
long group_id;
/*
* a guest name in a case when the item was created by a not logged in user (user_id is -1)
*/
std::wstring guest_name;
/*
* who has modified the item last
* this field is not taken into account when checking permissions
*/
long modification_user_id;
/*
* privileges, e.g: 0755
* IMPROVEME need some info here
*/
int privileges;
/*
* when the object was created
*/
PT::Date date_creation;
/*
* when the object was last modified
*/
PT::Date date_modification;
/*
* name of a link in the case when type is a symlink or a directory
*/
std::wstring link_to;
/*
* whether or not winix should make a redirect to link_to link
* IMPROVE ME should it be 'bool'?
*/
int link_redirect;
/*
* static file (if exists)
* relative file path
*/
std::wstring file_path;
/*
* file system type where the file was saved
*/
int file_fs;
/*
* file type (none, image, doc, etc)
*/
int file_type;
/*
* whether or not we have a thumbnail
*/
bool file_has_thumb;
/*
* file hash (md4, md5, ...)
*/
std::wstring file_hash;
/*
* hash type WINIX_CRYPT_HASH_* (see crypt.h)
*/
int file_hash_type;
/*
* size of the file
*/
size_t file_size;
/*
* object content as provided by the user
*/
std::wstring content_raw;
/*
* raw content type
*/
ContentType content_raw_type;
/*
* parsed object content
* IMPROVEME not used in winix yet
*/
std::wstring content_parsed;
/*
* parsed content type
* IMPROVEME not used in winix yet
*/
ContentType content_parsed_type;
/*
* meta information
* additional information in the form af a Space struct
*/
PT::Space meta;
/*
* admin meta information
* additional information available to edit only by an admin
*/
PT::Space meta_admin;
ItemContent();
void map_fields();
void table_name(PT::TextStream & stream);
void after_insert();
void SetDateToNow();
void SetDateModifyToNow();
/*
* what about clear() from Model?
*/
void Clear();
static bool CanContentBeHtmlFiltered(ItemContent::ContentType ct);
bool CanContentBeHtmlFiltered();
// IMPROVEME move me to morm
using morm::Model::field;
void field(const wchar_t * db_field_name, PT::Space & space);
};
} // namespace Winix
#endif

View File

@ -37,14 +37,14 @@ notify.o: ../../../winix/winixd/core/winixmodel.h
notify.o: ../../../winix/winixd/core/plugin.h notify.o: ../../../winix/winixd/core/plugin.h
notify.o: ../../../winix/winixd/core/pluginmsg.h notify.o: ../../../winix/winixd/core/pluginmsg.h
notify.o: ../../../winix/winixd/core/plugindata.h notify.o: ../../../winix/winixd/core/plugindata.h
notify.o: ../../../winix/winixd/core/winixbase.h ../../../morm/src/morm.h notify.o: ../../../winix/winixd/core/winixbase.h
notify.o: ../../../morm/src/morm_types.h ../../../morm/src/model.h
notify.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h notify.o: ../../../morm/src/modelconnector.h ../../../morm/src/clearer.h
notify.o: ../../../morm/src/dbconnector.h ../../../morm/src/queryresult.h notify.o: ../../../morm/src/dbconnector.h ../../../morm/src/queryresult.h
notify.o: ../../../morm/src/flatconnector.h ../../../morm/src/dbexpression.h notify.o: ../../../morm/src/flatconnector.h ../../../morm/src/morm.h
notify.o: ../../../morm/src/baseexpression.h ../../../morm/src/modelenv.h notify.o: ../../../morm/src/morm_types.h ../../../morm/src/model.h
notify.o: ../../../morm/src/modeldata.h ../../../morm/src/cursorhelper.h notify.o: ../../../morm/src/dbexpression.h ../../../morm/src/baseexpression.h
notify.o: ../../../morm/src/finderhelper.h notify.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h
notify.o: ../../../morm/src/cursorhelper.h ../../../morm/src/finderhelper.h
notify.o: ../../../morm/src/fieldvaluehelper.h notify.o: ../../../morm/src/fieldvaluehelper.h
notify.o: ../../../morm/src/flatexpression.h ../../../morm/src/finder.h notify.o: ../../../morm/src/flatexpression.h ../../../morm/src/finder.h
notify.o: ../../../morm/src/cursor.h ../../../morm/src/jsonexpression.h notify.o: ../../../morm/src/cursor.h ../../../morm/src/jsonexpression.h
@ -60,6 +60,8 @@ notify.o: ../../../winix/winixd/core/lastcontainer.h
notify.o: ../../../winix/winixd/core/cur.h notify.o: ../../../winix/winixd/core/cur.h
notify.o: ../../../winix/winixd/core/request.h notify.o: ../../../winix/winixd/core/request.h
notify.o: ../../../winix/winixd/core/requesttypes.h notify.o: ../../../winix/winixd/core/requesttypes.h
notify.o: ../../../winix/winixd/models/item.h
notify.o: ../../../winix/winixd/models/itemcontent.h
notify.o: ../../../winix/winixd/core/error.h notify.o: ../../../winix/winixd/core/error.h
notify.o: ../../../winix/winixd/core/config.h notify.o: ../../../winix/winixd/core/config.h
notify.o: ../../../winix/winixd/core/textstream.h notify.o: ../../../winix/winixd/core/textstream.h
@ -73,7 +75,6 @@ notify.o: ../../../winix/winixd/db/dbbase.h ../../../winix/winixd/db/dbconn.h
notify.o: ../../../winix/winixd/db/dbtextstream.h notify.o: ../../../winix/winixd/db/dbtextstream.h
notify.o: ../../../winix/winixd/core/error.h notify.o: ../../../winix/winixd/core/error.h
notify.o: ../../../winix/winixd/db/dbitemquery.h notify.o: ../../../winix/winixd/db/dbitemquery.h
notify.o: ../../../winix/winixd/core/item.h
notify.o: ../../../winix/winixd/db/dbitemcolumns.h notify.o: ../../../winix/winixd/db/dbitemcolumns.h
notify.o: ../../../winix/winixd/core/user.h notify.o: ../../../winix/winixd/core/user.h
notify.o: ../../../winix/winixd/core/group.h notify.o: ../../../winix/winixd/core/group.h
@ -166,11 +167,11 @@ notifythread.o: ../../../winix/winixd/core/plugin.h
notifythread.o: ../../../winix/winixd/core/pluginmsg.h notifythread.o: ../../../winix/winixd/core/pluginmsg.h
notifythread.o: ../../../winix/winixd/core/plugindata.h notifythread.o: ../../../winix/winixd/core/plugindata.h
notifythread.o: ../../../winix/winixd/core/winixbase.h notifythread.o: ../../../winix/winixd/core/winixbase.h
notifythread.o: ../../../morm/src/morm.h ../../../morm/src/morm_types.h notifythread.o: ../../../morm/src/modelconnector.h
notifythread.o: ../../../morm/src/model.h ../../../morm/src/modelconnector.h
notifythread.o: ../../../morm/src/clearer.h ../../../morm/src/dbconnector.h notifythread.o: ../../../morm/src/clearer.h ../../../morm/src/dbconnector.h
notifythread.o: ../../../morm/src/queryresult.h notifythread.o: ../../../morm/src/queryresult.h
notifythread.o: ../../../morm/src/flatconnector.h notifythread.o: ../../../morm/src/flatconnector.h ../../../morm/src/morm.h
notifythread.o: ../../../morm/src/morm_types.h ../../../morm/src/model.h
notifythread.o: ../../../morm/src/dbexpression.h notifythread.o: ../../../morm/src/dbexpression.h
notifythread.o: ../../../morm/src/baseexpression.h notifythread.o: ../../../morm/src/baseexpression.h
notifythread.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h notifythread.o: ../../../morm/src/modelenv.h ../../../morm/src/modeldata.h
@ -204,6 +205,8 @@ notifythread.o: ../../../winix/winixd/core/lastcontainer.h
notifythread.o: ../../../winix/winixd/core/cur.h notifythread.o: ../../../winix/winixd/core/cur.h
notifythread.o: ../../../winix/winixd/core/request.h notifythread.o: ../../../winix/winixd/core/request.h
notifythread.o: ../../../winix/winixd/core/requesttypes.h notifythread.o: ../../../winix/winixd/core/requesttypes.h
notifythread.o: ../../../winix/winixd/models/item.h
notifythread.o: ../../../winix/winixd/models/itemcontent.h
notifythread.o: ../../../winix/winixd/core/error.h notifythread.o: ../../../winix/winixd/core/error.h
notifythread.o: ../../../winix/winixd/core/config.h notifythread.o: ../../../winix/winixd/core/config.h
notifythread.o: ../../../winix/winixd/core/textstream.h notifythread.o: ../../../winix/winixd/core/textstream.h
@ -219,7 +222,6 @@ notifythread.o: ../../../winix/winixd/db/dbconn.h
notifythread.o: ../../../winix/winixd/db/dbtextstream.h notifythread.o: ../../../winix/winixd/db/dbtextstream.h
notifythread.o: ../../../winix/winixd/core/error.h notifythread.o: ../../../winix/winixd/core/error.h
notifythread.o: ../../../winix/winixd/db/dbitemquery.h notifythread.o: ../../../winix/winixd/db/dbitemquery.h
notifythread.o: ../../../winix/winixd/core/item.h
notifythread.o: ../../../winix/winixd/db/dbitemcolumns.h notifythread.o: ../../../winix/winixd/db/dbitemcolumns.h
notifythread.o: ../../../winix/winixd/core/user.h notifythread.o: ../../../winix/winixd/core/user.h
notifythread.o: ../../../winix/winixd/core/group.h notifythread.o: ../../../winix/winixd/core/group.h

View File

@ -5,13 +5,12 @@ edb.o: ../../../../winix/winixd/db/dbconn.h
edb.o: ../../../../winix/winixd/db/dbtextstream.h edb.o: ../../../../winix/winixd/db/dbtextstream.h
edb.o: ../../../../winix/winixd/core/textstream.h edb.o: ../../../../winix/winixd/core/textstream.h
edb.o: ../../../../winix/winixd/core/misc.h edb.o: ../../../../winix/winixd/core/misc.h
edb.o: ../../../../winix/winixd/core/item.h edb.o: ../../../../winix/winixd/core/requesttypes.h
edb.o: ../../../../pikotools/textstream/textstream.h
edb.o: ../../../../pikotools/space/space.h edb.o: ../../../../pikotools/space/space.h
edb.o: ../../../../pikotools/textstream/types.h edb.o: ../../../../pikotools/textstream/types.h
edb.o: ../../../../pikotools/date/date.h edb.o: ../../../../pikotools/date/date.h
edb.o: ../../../../pikotools/convert/inttostr.h edb.o: ../../../../pikotools/convert/inttostr.h
edb.o: ../../../../winix/winixd/core/requesttypes.h
edb.o: ../../../../pikotools/textstream/textstream.h
edb.o: ../../../../pikotools/membuffer/membuffer.h edb.o: ../../../../pikotools/membuffer/membuffer.h
edb.o: ../../../../pikotools/textstream/types.h edb.o: ../../../../pikotools/textstream/types.h
edb.o: ../../../../pikotools/utf8/utf8.h edb.o: ../../../../pikotools/utf8/utf8.h
@ -37,9 +36,20 @@ edb.o: ../../../../winix/winixd/core/error.h export.h
edb.o: ../../../../winix/winixd/core/dirs.h edb.o: ../../../../winix/winixd/core/dirs.h
edb.o: ../../../../winix/winixd/core/dircontainer.h edb.o: ../../../../winix/winixd/core/dircontainer.h
edb.o: ../../../../winix/winixd/core/winixbase.h edb.o: ../../../../winix/winixd/core/winixbase.h
edb.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.h
edb.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
edb.o: ../../../../morm/src/dbconnector.h ../../../../morm/src/queryresult.h
edb.o: ../../../../morm/src/flatconnector.h
edb.o: ../../../../morm/src/dbexpression.h
edb.o: ../../../../morm/src/baseexpression.h
edb.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
edb.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
edb.o: ../../../../morm/src/finderhelper.h
edb.o: ../../../../morm/src/fieldvaluehelper.h
edb.o: ../../../../morm/src/flatexpression.h
edb.o: ../../../../winix/winixd/models/itemcontent.h
edb.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h edb.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h
edb.o: ../../../../winix/winixd/db/dbitemquery.h edb.o: ../../../../winix/winixd/db/dbitemquery.h
edb.o: ../../../../winix/winixd/core/item.h
edb.o: ../../../../winix/winixd/db/dbitemcolumns.h edb.o: ../../../../winix/winixd/db/dbitemcolumns.h
edb.o: ../../../../winix/winixd/core/user.h edb.o: ../../../../winix/winixd/core/user.h
edb.o: ../../../../winix/winixd/core/group.h edb.o: ../../../../winix/winixd/core/group.h
@ -56,17 +66,8 @@ edb.o: ../../../../winix/winixd/core/winixmodel.h
edb.o: ../../../../winix/winixd/core/plugin.h edb.o: ../../../../winix/winixd/core/plugin.h
edb.o: ../../../../winix/winixd/core/pluginmsg.h edb.o: ../../../../winix/winixd/core/pluginmsg.h
edb.o: ../../../../winix/winixd/core/plugindata.h ../../../../morm/src/morm.h edb.o: ../../../../winix/winixd/core/plugindata.h ../../../../morm/src/morm.h
edb.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h edb.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
edb.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h edb.o: ../../../../morm/src/jsonexpression.h
edb.o: ../../../../morm/src/dbconnector.h ../../../../morm/src/queryresult.h
edb.o: ../../../../morm/src/flatconnector.h
edb.o: ../../../../morm/src/dbexpression.h
edb.o: ../../../../morm/src/baseexpression.h ../../../../morm/src/modelenv.h
edb.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
edb.o: ../../../../morm/src/finderhelper.h
edb.o: ../../../../morm/src/fieldvaluehelper.h
edb.o: ../../../../morm/src/flatexpression.h ../../../../morm/src/finder.h
edb.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
edb.o: ../../../../morm/src/postgresqlexpression.h edb.o: ../../../../morm/src/postgresqlexpression.h
edb.o: ../../../../morm/src/jsonconnector.h edb.o: ../../../../morm/src/jsonconnector.h
edb.o: ../../../../morm/src/postgresqlconnector.h edb.o: ../../../../morm/src/postgresqlconnector.h
@ -99,13 +100,13 @@ exportinfo.o: ../../../../winix/winixd/core/plugin.h
exportinfo.o: ../../../../winix/winixd/core/pluginmsg.h exportinfo.o: ../../../../winix/winixd/core/pluginmsg.h
exportinfo.o: ../../../../winix/winixd/core/plugindata.h exportinfo.o: ../../../../winix/winixd/core/plugindata.h
exportinfo.o: ../../../../winix/winixd/core/winixbase.h exportinfo.o: ../../../../winix/winixd/core/winixbase.h
exportinfo.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
exportinfo.o: ../../../../morm/src/model.h
exportinfo.o: ../../../../morm/src/modelconnector.h exportinfo.o: ../../../../morm/src/modelconnector.h
exportinfo.o: ../../../../morm/src/clearer.h exportinfo.o: ../../../../morm/src/clearer.h
exportinfo.o: ../../../../morm/src/dbconnector.h exportinfo.o: ../../../../morm/src/dbconnector.h
exportinfo.o: ../../../../morm/src/queryresult.h exportinfo.o: ../../../../morm/src/queryresult.h
exportinfo.o: ../../../../morm/src/flatconnector.h exportinfo.o: ../../../../morm/src/flatconnector.h
exportinfo.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
exportinfo.o: ../../../../morm/src/model.h
exportinfo.o: ../../../../morm/src/dbexpression.h exportinfo.o: ../../../../morm/src/dbexpression.h
exportinfo.o: ../../../../morm/src/baseexpression.h exportinfo.o: ../../../../morm/src/baseexpression.h
exportinfo.o: ../../../../morm/src/modelenv.h exportinfo.o: ../../../../morm/src/modelenv.h
@ -122,12 +123,12 @@ exportinfo.o: ../../../../morm/src/jsonconnector.h
exportinfo.o: ../../../../morm/src/postgresqlconnector.h exportinfo.o: ../../../../morm/src/postgresqlconnector.h
exportinfo.o: ../../../../morm/src/postgresqlqueryresult.h exportinfo.o: ../../../../morm/src/postgresqlqueryresult.h
exportinfo.o: ../../../../winix/winixd/core/dirs.h exportinfo.o: ../../../../winix/winixd/core/dirs.h
exportinfo.o: ../../../../winix/winixd/core/item.h
exportinfo.o: ../../../../winix/winixd/core/dircontainer.h exportinfo.o: ../../../../winix/winixd/core/dircontainer.h
exportinfo.o: ../../../../winix/winixd/models/item.h
exportinfo.o: ../../../../winix/winixd/models/itemcontent.h
exportinfo.o: ../../../../winix/winixd/db/db.h exportinfo.o: ../../../../winix/winixd/db/db.h
exportinfo.o: ../../../../winix/winixd/db/dbbase.h exportinfo.o: ../../../../winix/winixd/db/dbbase.h
exportinfo.o: ../../../../winix/winixd/db/dbitemquery.h exportinfo.o: ../../../../winix/winixd/db/dbitemquery.h
exportinfo.o: ../../../../winix/winixd/core/item.h
exportinfo.o: ../../../../winix/winixd/db/dbitemcolumns.h exportinfo.o: ../../../../winix/winixd/db/dbitemcolumns.h
exportinfo.o: ../../../../winix/winixd/core/user.h exportinfo.o: ../../../../winix/winixd/core/user.h
exportinfo.o: ../../../../winix/winixd/core/group.h exportinfo.o: ../../../../winix/winixd/core/group.h
@ -175,9 +176,10 @@ exportinfo.o: ../../../../winix/winixd/templates/patterns.h
exportinfo.o: ../../../../winix/winixd/templates/locale.h exportinfo.o: ../../../../winix/winixd/templates/locale.h
exportinfo.o: ../../../../winix/winixd/templates/localefilter.h exportinfo.o: ../../../../winix/winixd/templates/localefilter.h
exportinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h exportinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
exportinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h exportinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
exportinfo.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h exportinfo.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
exportinfo.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h exportinfo.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
exportinfo.o: ../../../../ezc/src/pattern.h
exportinfo.o: ../../../../ezc/src/expressionparser.h exportinfo.o: ../../../../ezc/src/expressionparser.h
exportinfo.o: ../../../../ezc/src/patternparser.h exportinfo.o: ../../../../ezc/src/patternparser.h
exportinfo.o: ../../../../winix/winixd/notify/notifythread.h exportinfo.o: ../../../../winix/winixd/notify/notifythread.h
@ -196,13 +198,12 @@ exportinfo.o: ../../../../pikotools/convert/text.h
exportthread.o: exportthread.h ../../../../winix/winixd/core/basethread.h exportthread.o: exportthread.h ../../../../winix/winixd/core/basethread.h
exportthread.o: message.h ../../../../winix/winixd/core/log.h exportthread.o: message.h ../../../../winix/winixd/core/log.h
exportthread.o: ../../../../winix/winixd/core/misc.h exportthread.o: ../../../../winix/winixd/core/misc.h
exportthread.o: ../../../../winix/winixd/core/item.h exportthread.o: ../../../../winix/winixd/core/requesttypes.h
exportthread.o: ../../../../pikotools/textstream/textstream.h
exportthread.o: ../../../../pikotools/space/space.h exportthread.o: ../../../../pikotools/space/space.h
exportthread.o: ../../../../pikotools/textstream/types.h exportthread.o: ../../../../pikotools/textstream/types.h
exportthread.o: ../../../../pikotools/date/date.h exportthread.o: ../../../../pikotools/date/date.h
exportthread.o: ../../../../pikotools/convert/inttostr.h exportthread.o: ../../../../pikotools/convert/inttostr.h
exportthread.o: ../../../../winix/winixd/core/requesttypes.h
exportthread.o: ../../../../pikotools/textstream/textstream.h
exportthread.o: ../../../../pikotools/membuffer/membuffer.h exportthread.o: ../../../../pikotools/membuffer/membuffer.h
exportthread.o: ../../../../pikotools/textstream/types.h exportthread.o: ../../../../pikotools/textstream/types.h
exportthread.o: ../../../../pikotools/utf8/utf8.h exportthread.o: ../../../../pikotools/utf8/utf8.h
@ -215,7 +216,6 @@ exportthread.o: ../../../../pikotools/convert/text.h
exportthread.o: ../../../../winix/winixd/core/misc.h exportthread.o: ../../../../winix/winixd/core/misc.h
exportthread.o: ../../../../pikotools/convert/text.h exportthread.o: ../../../../pikotools/convert/text.h
funexport.o: funexport.h ../../../../winix/winixd/functions/functionbase.h funexport.o: funexport.h ../../../../winix/winixd/functions/functionbase.h
funexport.o: ../../../../winix/winixd/core/item.h
funexport.o: ../../../../winix/winixd/db/db.h funexport.o: ../../../../winix/winixd/db/db.h
funexport.o: ../../../../winix/winixd/db/dbbase.h funexport.o: ../../../../winix/winixd/db/dbbase.h
funexport.o: ../../../../winix/winixd/db/dbitemquery.h funexport.o: ../../../../winix/winixd/db/dbitemquery.h
@ -234,7 +234,24 @@ funexport.o: ../../../../winix/winixd/core/requesttypes.h
funexport.o: ../../../../pikotools/textstream/textstream.h funexport.o: ../../../../pikotools/textstream/textstream.h
funexport.o: ../../../../pikotools/membuffer/membuffer.h funexport.o: ../../../../pikotools/membuffer/membuffer.h
funexport.o: ../../../../pikotools/textstream/types.h funexport.o: ../../../../pikotools/textstream/types.h
funexport.o: ../../../../winix/winixd/core/item.h funexport.o: ../../../../winix/winixd/models/item.h
funexport.o: ../../../../morm/src/model.h
funexport.o: ../../../../morm/src/modelconnector.h
funexport.o: ../../../../morm/src/clearer.h
funexport.o: ../../../../morm/src/dbconnector.h
funexport.o: ../../../../pikotools/log/log.h
funexport.o: ../../../../pikotools/log/filelog.h
funexport.o: ../../../../morm/src/queryresult.h
funexport.o: ../../../../morm/src/flatconnector.h
funexport.o: ../../../../morm/src/dbexpression.h
funexport.o: ../../../../morm/src/baseexpression.h
funexport.o: ../../../../morm/src/morm_types.h
funexport.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
funexport.o: ../../../../morm/src/cursorhelper.h
funexport.o: ../../../../morm/src/finderhelper.h
funexport.o: ../../../../morm/src/fieldvaluehelper.h
funexport.o: ../../../../morm/src/flatexpression.h
funexport.o: ../../../../winix/winixd/models/itemcontent.h
funexport.o: ../../../../winix/winixd/core/error.h funexport.o: ../../../../winix/winixd/core/error.h
funexport.o: ../../../../winix/winixd/core/config.h funexport.o: ../../../../winix/winixd/core/config.h
funexport.o: ../../../../winix/winixd/core/textstream.h funexport.o: ../../../../winix/winixd/core/textstream.h
@ -255,8 +272,6 @@ funexport.o: ../../../../winix/winixd/core/config.h
funexport.o: ../../../../pikotools/space/spaceparser.h funexport.o: ../../../../pikotools/space/spaceparser.h
funexport.o: ../../../../winix/winixd/core/log.h funexport.o: ../../../../winix/winixd/core/log.h
funexport.o: ../../../../winix/winixd/core/logmanipulators.h funexport.o: ../../../../winix/winixd/core/logmanipulators.h
funexport.o: ../../../../pikotools/log/log.h
funexport.o: ../../../../pikotools/log/filelog.h
funexport.o: ../../../../winix/winixd/core/system.h funexport.o: ../../../../winix/winixd/core/system.h
funexport.o: ../../../../winix/winixd/core/job.h funexport.o: ../../../../winix/winixd/core/job.h
funexport.o: ../../../../winix/winixd/core/basethread.h funexport.o: ../../../../winix/winixd/core/basethread.h
@ -270,21 +285,8 @@ funexport.o: ../../../../winix/winixd/core/lock.h
funexport.o: ../../../../winix/winixd/core/plugin.h funexport.o: ../../../../winix/winixd/core/plugin.h
funexport.o: ../../../../winix/winixd/core/pluginmsg.h funexport.o: ../../../../winix/winixd/core/pluginmsg.h
funexport.o: ../../../../winix/winixd/core/plugindata.h funexport.o: ../../../../winix/winixd/core/plugindata.h
funexport.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h funexport.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
funexport.o: ../../../../morm/src/model.h funexport.o: ../../../../morm/src/cursor.h
funexport.o: ../../../../morm/src/modelconnector.h
funexport.o: ../../../../morm/src/clearer.h
funexport.o: ../../../../morm/src/dbconnector.h
funexport.o: ../../../../morm/src/queryresult.h
funexport.o: ../../../../morm/src/flatconnector.h
funexport.o: ../../../../morm/src/dbexpression.h
funexport.o: ../../../../morm/src/baseexpression.h
funexport.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
funexport.o: ../../../../morm/src/cursorhelper.h
funexport.o: ../../../../morm/src/finderhelper.h
funexport.o: ../../../../morm/src/fieldvaluehelper.h
funexport.o: ../../../../morm/src/flatexpression.h
funexport.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
funexport.o: ../../../../morm/src/jsonexpression.h funexport.o: ../../../../morm/src/jsonexpression.h
funexport.o: ../../../../morm/src/postgresqlexpression.h funexport.o: ../../../../morm/src/postgresqlexpression.h
funexport.o: ../../../../morm/src/jsonconnector.h funexport.o: ../../../../morm/src/jsonconnector.h
@ -319,9 +321,10 @@ funexport.o: ../../../../winix/winixd/templates/patterns.h
funexport.o: ../../../../winix/winixd/templates/locale.h funexport.o: ../../../../winix/winixd/templates/locale.h
funexport.o: ../../../../winix/winixd/templates/localefilter.h funexport.o: ../../../../winix/winixd/templates/localefilter.h
funexport.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h funexport.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
funexport.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h funexport.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
funexport.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h funexport.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
funexport.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h funexport.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
funexport.o: ../../../../ezc/src/pattern.h
funexport.o: ../../../../ezc/src/expressionparser.h funexport.o: ../../../../ezc/src/expressionparser.h
funexport.o: ../../../../ezc/src/patternparser.h funexport.o: ../../../../ezc/src/patternparser.h
funexport.o: ../../../../winix/winixd/notify/notifythread.h funexport.o: ../../../../winix/winixd/notify/notifythread.h
@ -350,7 +353,19 @@ init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/plugin.h init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../winix/winixd/core/winixbase.h exportthread.h init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../morm/src/dbconnector.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/log/log.h ../../../../pikotools/log/filelog.h
init.o: ../../../../morm/src/queryresult.h
init.o: ../../../../morm/src/flatconnector.h exportthread.h
init.o: ../../../../winix/winixd/core/basethread.h message.h exportinfo.h init.o: ../../../../winix/winixd/core/basethread.h message.h exportinfo.h
init.o: ../../../../winix/winixd/core/system.h init.o: ../../../../winix/winixd/core/system.h
init.o: ../../../../winix/winixd/core/job.h init.o: ../../../../winix/winixd/core/job.h
@ -363,23 +378,11 @@ init.o: ../../../../pikotools/space/spaceparser.h
init.o: ../../../../pikotools/space/space.h init.o: ../../../../pikotools/space/space.h
init.o: ../../../../winix/winixd/core/log.h init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/logmanipulators.h init.o: ../../../../winix/winixd/core/logmanipulators.h
init.o: ../../../../pikotools/log/log.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/log/filelog.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/filelog.h init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/lock.h init.o: ../../../../winix/winixd/core/lock.h
init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h init.o: ../../../../morm/src/morm_types.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/dbexpression.h
init.o: ../../../../morm/src/baseexpression.h ../../../../morm/src/modelenv.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/modeldata.h ../../../../morm/src/cursorhelper.h
@ -393,11 +396,11 @@ init.o: ../../../../morm/src/jsonconnector.h
init.o: ../../../../morm/src/postgresqlconnector.h init.o: ../../../../morm/src/postgresqlconnector.h
init.o: ../../../../morm/src/postgresqlqueryresult.h init.o: ../../../../morm/src/postgresqlqueryresult.h
init.o: ../../../../winix/winixd/core/dirs.h init.o: ../../../../winix/winixd/core/dirs.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/models/item.h
init.o: ../../../../winix/winixd/models/itemcontent.h
init.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h init.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbitemquery.h init.o: ../../../../winix/winixd/db/dbitemquery.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/db/dbitemcolumns.h init.o: ../../../../winix/winixd/db/dbitemcolumns.h
init.o: ../../../../winix/winixd/core/user.h init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
@ -445,10 +448,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/notify/templatesnotify.h init.o: ../../../../winix/winixd/notify/templatesnotify.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2018, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -188,7 +188,7 @@ void ExportInfo::SendFile(const Item & item, bool thumb, bool put_to_recurrence_
system->dirs.MakePath(item.parent_id, msg.path); system->dirs.MakePath(item.parent_id, msg.path);
msg.path += item.url; msg.path += item.url;
if( item.file_type != WINIX_ITEM_FILETYPE_NONE ) if( item.item_content.file_type != WINIX_ITEM_FILETYPE_NONE )
{ {
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC; msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC;
@ -220,7 +220,7 @@ void ExportInfo::SendFile(const Item & item, bool thumb, bool put_to_recurrence_
msg.http_server = exp.http_server; msg.http_server = exp.http_server;
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir); system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
if( !item.file_path.empty() && thumb ) // !! uzyc file_type if( !item.item_content.file_path.empty() && thumb ) // !! uzyc file_type
msg.path.insert(0, L"/download"); // !! do konfiga msg.path.insert(0, L"/download"); // !! do konfiga
if( !exp.ftp_dir.empty() ) if( !exp.ftp_dir.empty() )
@ -299,15 +299,26 @@ void ExportInfo::SendDir(long dir_id)
// send all non-static files from a directory // send all non-static files from a directory
void ExportInfo::SendAllFilesFromDir(long dir_id) void ExportInfo::SendAllFilesFromDir(long dir_id)
{ {
iq_dir.SetAll(false, false); // iq_dir.SetAll(false, false);
iq_dir.sel_parent_id = true; // iq_dir.sel_parent_id = true;
iq_dir.sel_url = true; // iq_dir.sel_url = true;
iq_dir.sel_file = true; // iq_dir.sel_file = true;
iq_dir.WhereParentId(dir_id); // iq_dir.WhereParentId(dir_id);
iq_dir.WhereType(Item::file); // iq_dir.WhereType(Item::file);
iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); // iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(dir_items, iq_dir);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", dir_id).
eq(L"type", static_cast<int>(Item::file)).
eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE).
get_vector(dir_items);
//db->GetItems(dir_items, iq_dir);
for(size_t i=0 ; i<dir_items.size() ; ++i) for(size_t i=0 ; i<dir_items.size() ; ++i)
{ {
@ -319,10 +330,10 @@ void ExportInfo::SendAllFilesFromDir(long dir_id)
void ExportInfo::AdditionalExport(const Item & item) void ExportInfo::AdditionalExport(const Item & item)
{ {
for(size_t i=0 ; i<item.meta.spaces.size() ; ++i) for(size_t i=0 ; i<item.item_content.meta.spaces.size() ; ++i)
{ {
if( item.meta.spaces[i]->name == L"export" ) if( item.item_content.meta.spaces[i]->name == L"export" )
AdditionalExport(item, *item.meta.spaces[i]); AdditionalExport(item, *item.item_content.meta.spaces[i]);
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2014, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -41,7 +41,7 @@
#include "edb.h" #include "edb.h"
#include "message.h" #include "message.h"
#include "exportthread.h" #include "exportthread.h"
#include "core/winixbase.h" #include "core/winixmodel.h"
@ -52,7 +52,7 @@ namespace Export
{ {
class ExportInfo : public WinixBase class ExportInfo : public WinixModel
{ {
public: public:
@ -93,7 +93,7 @@ private:
Export exp; Export exp;
std::wstring tmp_dir; std::wstring tmp_dir;
std::vector<ExportDir> export_dirs; std::vector<ExportDir> export_dirs;
DbItemQuery iq_dir; //DbItemQuery iq_dir;
std::vector<Item> dir_items; std::vector<Item> dir_items;
std::vector<std::wstring> additional_export; std::vector<std::wstring> additional_export;
std::vector<Item*> additional_export_dir_tab; std::vector<Item*> additional_export_dir_tab;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2012-2014, Tomasz Sowa * Copyright (c) 2012-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -68,7 +68,7 @@ void FunExport::ExportFile(const Item & item)
{ {
log << log4 << "Export: exporting file: url: " << item.url << ", id: " << item.id << logend; log << log4 << "Export: exporting file: url: " << item.url << ", id: " << item.id << logend;
if( item.file_type == WINIX_ITEM_FILETYPE_NONE ) if( item.item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
{ {
export_info->SendFile(item, false, true); export_info->SendFile(item, false, true);
} }
@ -86,25 +86,36 @@ void FunExport::ExportDir(const Item & dir, bool static_files_too)
log << log4 << "Export: exporting directory: url: " << dir.url << ", id: " << dir.id << logend; log << log4 << "Export: exporting directory: url: " << dir.url << ", id: " << dir.id << logend;
iq_dir.SetAll(false, false); // iq_dir.SetAll(false, false);
iq_dir.sel_parent_id = true; // iq_dir.sel_parent_id = true;
iq_dir.sel_url = true; // iq_dir.sel_url = true;
iq_dir.sel_file = true; // iq_dir.sel_file = true;
iq_dir.WhereParentId(dir.id); // iq_dir.WhereParentId(dir.id);
iq_dir.WhereType(Item::file); // iq_dir.WhereType(Item::file);
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", dir.id).
eq(L"type", static_cast<int>(Item::file));
if( !static_files_too ) if( !static_files_too )
iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); {
//iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
finder.eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE);
}
db->GetItems(dir_items, iq_dir); finder.get_vector(dir_items);
//db->GetItems(dir_items, iq_dir);
for(size_t i=0 ; i<dir_items.size() ; ++i) for(size_t i=0 ; i<dir_items.size() ; ++i)
{ {
ExportFile(dir_items[i]); ExportFile(dir_items[i]);
} }
DirContainer::ParentIterator i = system->dirs.FindFirstChild(dir.id); DirContainer::ParentIterator i = system->dirs.FindFirstChild(dir.id);
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) ) for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2012-2014, Tomasz Sowa * Copyright (c) 2012-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -66,7 +66,7 @@ public:
private: private:
ExportInfo * export_info; ExportInfo * export_info;
DbItemQuery iq_dir; //DbItemQuery iq_dir;
std::vector<Item> dir_items; std::vector<Item> dir_items;
void Export(); void Export();

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2018, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -113,7 +113,7 @@ void SendFileAdded(PluginInfo & info)
if( item ) if( item )
{ {
if( item->file_type == WINIX_ITEM_FILETYPE_IMAGE && info.config->image_resize ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE && info.config->image_resize )
{ {
// there'll be a next message WINIX_IMAGE_RESIZED // there'll be a next message WINIX_IMAGE_RESIZED
info.log << log4 << "Export: image will be resized, waiting..." << logend; info.log << log4 << "Export: image will be resized, waiting..." << logend;
@ -124,7 +124,7 @@ void SendFileAdded(PluginInfo & info)
export_info.SendFile(*item); export_info.SendFile(*item);
export_info.SendDir(item->parent_id); export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id); export_info.SendAllFilesFromDir(item->parent_id);
} }
} }
@ -141,7 +141,7 @@ void SendFileChanged(PluginInfo & info)
export_info.SendFile(*item); export_info.SendFile(*item);
export_info.SendDir(item->parent_id); export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id); export_info.SendAllFilesFromDir(item->parent_id);
} }
} }
@ -157,7 +157,7 @@ void SendFileCopied(PluginInfo & info)
export_info.ResetRecurrenceCheck(); export_info.ResetRecurrenceCheck();
export_info.SendDir(item->parent_id); export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
{ {
export_info.SendAllFilesFromDir(item->parent_id); export_info.SendAllFilesFromDir(item->parent_id);
} }
@ -203,7 +203,7 @@ void SendFilePrepareMove(PluginInfo & info)
if( item ) if( item )
{ {
if( item->file_type == WINIX_ITEM_FILETYPE_NONE ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
{ {
export_info.ResetRecurrenceCheck(); export_info.ResetRecurrenceCheck();
export_info.SendAllFilesFromDir(item->parent_id); export_info.SendAllFilesFromDir(item->parent_id);
@ -221,7 +221,7 @@ void FileRemoved(PluginInfo & info)
export_info.ResetRecurrenceCheck(); export_info.ResetRecurrenceCheck();
export_info.SendDir(item->parent_id); export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE ) if( item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id); export_info.SendAllFilesFromDir(item->parent_id);
} }
} }

View File

@ -1,20 +1,18 @@
# DO NOT DELETE # DO NOT DELETE
gallery.o: gallery.h ../../../../winix/winixd/functions/functionbase.h 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/db.h
gallery.o: ../../../../winix/winixd/db/dbbase.h gallery.o: ../../../../winix/winixd/db/dbbase.h
gallery.o: ../../../../winix/winixd/db/dbconn.h gallery.o: ../../../../winix/winixd/db/dbconn.h
gallery.o: ../../../../winix/winixd/db/dbtextstream.h gallery.o: ../../../../winix/winixd/db/dbtextstream.h
gallery.o: ../../../../winix/winixd/core/textstream.h gallery.o: ../../../../winix/winixd/core/textstream.h
gallery.o: ../../../../winix/winixd/core/misc.h gallery.o: ../../../../winix/winixd/core/misc.h
gallery.o: ../../../../winix/winixd/core/item.h
gallery.o: ../../../../winix/winixd/core/requesttypes.h gallery.o: ../../../../winix/winixd/core/requesttypes.h
gallery.o: ../../../../pikotools/textstream/textstream.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/membuffer/membuffer.h
gallery.o: ../../../../pikotools/textstream/types.h gallery.o: ../../../../pikotools/textstream/types.h
gallery.o: ../../../../pikotools/utf8/utf8.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/group.h
gallery.o: ../../../../winix/winixd/core/dircontainer.h gallery.o: ../../../../winix/winixd/core/dircontainer.h
gallery.o: ../../../../winix/winixd/core/winixbase.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/ugcontainer.h
gallery.o: ../../../../winix/winixd/core/request.h gallery.o: ../../../../winix/winixd/core/request.h
gallery.o: ../../../../winix/winixd/core/error.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/plugin.h
gallery.o: ../../../../winix/winixd/core/pluginmsg.h gallery.o: ../../../../winix/winixd/core/pluginmsg.h
gallery.o: ../../../../winix/winixd/core/plugindata.h gallery.o: ../../../../winix/winixd/core/plugindata.h
gallery.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h gallery.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
gallery.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h gallery.o: ../../../../morm/src/cursor.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/jsonexpression.h gallery.o: ../../../../morm/src/jsonexpression.h
gallery.o: ../../../../morm/src/postgresqlexpression.h gallery.o: ../../../../morm/src/postgresqlexpression.h
gallery.o: ../../../../morm/src/jsonconnector.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/locale.h
gallery.o: ../../../../winix/winixd/templates/localefilter.h gallery.o: ../../../../winix/winixd/templates/localefilter.h
gallery.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
gallery.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h gallery.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
gallery.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.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/expressionparser.h
gallery.o: ../../../../ezc/src/patternparser.h gallery.o: ../../../../ezc/src/patternparser.h
gallery.o: ../../../../winix/winixd/notify/notifythread.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: ../../../../winix/winixd/core/sessionidmanager.h
gallery.o: ../../../../tito/src/base64.h ../../../../tito/src/aes.h gallery.o: ../../../../tito/src/base64.h ../../../../tito/src/aes.h
gallery.o: ../../../../winix/winixd/core/slog.h galleryinfo.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/space/space.h
galleryinfo.o: ../../../../pikotools/textstream/types.h galleryinfo.o: ../../../../pikotools/textstream/types.h
galleryinfo.o: ../../../../pikotools/date/date.h galleryinfo.o: ../../../../pikotools/date/date.h
galleryinfo.o: ../../../../pikotools/convert/inttostr.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: 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/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbconn.h init.o: ../../../../winix/winixd/db/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/textstream.h init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../winix/winixd/core/misc.h init.o: ../../../../winix/winixd/core/misc.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/requesttypes.h init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../pikotools/textstream/textstream.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/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.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/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/core/winixbase.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/ugcontainer.h
init.o: ../../../../winix/winixd/core/request.h init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.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/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h init.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.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/cursor.h ../../../../morm/src/jsonexpression.h init.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.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/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.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/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h init.o: ../../../../winix/winixd/core/htmlfilter.h
templates.o: gallery.h ../../../../winix/winixd/functions/functionbase.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/db.h
templates.o: ../../../../winix/winixd/db/dbbase.h templates.o: ../../../../winix/winixd/db/dbbase.h
templates.o: ../../../../winix/winixd/db/dbconn.h templates.o: ../../../../winix/winixd/db/dbconn.h
templates.o: ../../../../winix/winixd/db/dbtextstream.h templates.o: ../../../../winix/winixd/db/dbtextstream.h
templates.o: ../../../../winix/winixd/core/textstream.h templates.o: ../../../../winix/winixd/core/textstream.h
templates.o: ../../../../winix/winixd/core/misc.h templates.o: ../../../../winix/winixd/core/misc.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/core/requesttypes.h templates.o: ../../../../winix/winixd/core/requesttypes.h
templates.o: ../../../../pikotools/textstream/textstream.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/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/utf8/utf8.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/group.h
templates.o: ../../../../winix/winixd/core/dircontainer.h templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/core/winixbase.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/ugcontainer.h
templates.o: ../../../../winix/winixd/core/request.h templates.o: ../../../../winix/winixd/core/request.h
templates.o: ../../../../winix/winixd/core/error.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/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h templates.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
templates.o: ../../../../morm/src/model.h templates.o: ../../../../morm/src/cursor.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/jsonexpression.h templates.o: ../../../../morm/src/jsonexpression.h
templates.o: ../../../../morm/src/postgresqlexpression.h templates.o: ../../../../morm/src/postgresqlexpression.h
templates.o: ../../../../morm/src/jsonconnector.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/locale.h
templates.o: ../../../../winix/winixd/templates/localefilter.h templates.o: ../../../../winix/winixd/templates/localefilter.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.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/expressionparser.h
templates.o: ../../../../ezc/src/patternparser.h templates.o: ../../../../ezc/src/patternparser.h
templates.o: ../../../../winix/winixd/notify/notifythread.h templates.o: ../../../../winix/winixd/notify/notifythread.h

View File

@ -80,19 +80,28 @@ void Gallery::SortPointers()
void Gallery::MakeGetDir() void Gallery::MakeGetDir()
{ {
iq.SetAll(false, false); // iq.SetAll(false, false);
iq.sel_parent_id = true; // iq.sel_parent_id = true;
iq.sel_subject = true; // iq.sel_subject = true;
iq.sel_url = true; // iq.sel_url = true;
iq.sel_type = true; // iq.sel_type = true;
iq.sel_file = true; // iq.sel_file = true;
iq.sel_sort_index = true; // iq.sel_sort_index = true;
iq.sel_meta = 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); morm::Finder<Item> finder(model_connector);
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
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(); CreatePointers();
} }

View File

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

View File

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

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2016, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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() ) if( gallery_index < gallery_info.item_sort_tab.size() )
{ {
Item & item = *gallery_info.item_sort_tab[gallery_index]; 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() ) if( gallery_index < gallery_info.item_sort_tab.size() )
{ {
Item & item = *gallery_info.item_sort_tab[gallery_index]; 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() ) if( gallery_index < gallery_info.item_sort_tab.size() )
{ {
Item & item = *gallery_info.item_sort_tab[gallery_index]; 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() ) if( gallery_index < gallery_info.item_sort_tab.size() )
{ {
Item & item = *gallery_info.item_sort_tab[gallery_index]; 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() ) if( gallery_index < gallery_info.item_sort_tab.size() )
{ {
Item & item = *gallery_info.item_sort_tab[gallery_index]; 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");
} }
} }

View File

@ -27,13 +27,12 @@ groupinfo.o: ../../../../winix/winixd/core/plugin.h
groupinfo.o: ../../../../winix/winixd/core/pluginmsg.h groupinfo.o: ../../../../winix/winixd/core/pluginmsg.h
groupinfo.o: ../../../../winix/winixd/core/plugindata.h groupinfo.o: ../../../../winix/winixd/core/plugindata.h
groupinfo.o: ../../../../winix/winixd/core/winixbase.h groupinfo.o: ../../../../winix/winixd/core/winixbase.h
groupinfo.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
groupinfo.o: ../../../../morm/src/model.h
groupinfo.o: ../../../../morm/src/modelconnector.h groupinfo.o: ../../../../morm/src/modelconnector.h
groupinfo.o: ../../../../morm/src/clearer.h groupinfo.o: ../../../../morm/src/clearer.h
groupinfo.o: ../../../../morm/src/dbconnector.h groupinfo.o: ../../../../morm/src/dbconnector.h
groupinfo.o: ../../../../morm/src/queryresult.h groupinfo.o: ../../../../morm/src/queryresult.h
groupinfo.o: ../../../../morm/src/flatconnector.h groupinfo.o: ../../../../morm/src/flatconnector.h ../../../../morm/src/morm.h
groupinfo.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h
groupinfo.o: ../../../../morm/src/dbexpression.h groupinfo.o: ../../../../morm/src/dbexpression.h
groupinfo.o: ../../../../morm/src/baseexpression.h groupinfo.o: ../../../../morm/src/baseexpression.h
groupinfo.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h groupinfo.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
@ -53,8 +52,9 @@ groupinfo.o: ../../../../winix/winixd/core/job.h
groupinfo.o: ../../../../winix/winixd/core/basethread.h groupinfo.o: ../../../../winix/winixd/core/basethread.h
groupinfo.o: ../../../../winix/winixd/core/winixmodel.h groupinfo.o: ../../../../winix/winixd/core/winixmodel.h
groupinfo.o: ../../../../winix/winixd/core/dirs.h groupinfo.o: ../../../../winix/winixd/core/dirs.h
groupinfo.o: ../../../../winix/winixd/core/item.h
groupinfo.o: ../../../../winix/winixd/core/dircontainer.h groupinfo.o: ../../../../winix/winixd/core/dircontainer.h
groupinfo.o: ../../../../winix/winixd/models/item.h
groupinfo.o: ../../../../winix/winixd/models/itemcontent.h
groupinfo.o: ../../../../winix/winixd/db/db.h groupinfo.o: ../../../../winix/winixd/db/db.h
groupinfo.o: ../../../../winix/winixd/db/dbbase.h groupinfo.o: ../../../../winix/winixd/db/dbbase.h
groupinfo.o: ../../../../winix/winixd/db/dbconn.h groupinfo.o: ../../../../winix/winixd/db/dbconn.h
@ -70,7 +70,6 @@ groupinfo.o: ../../../../pikotools/convert/strtoint.h
groupinfo.o: ../../../../pikotools/convert/text.h groupinfo.o: ../../../../pikotools/convert/text.h
groupinfo.o: ../../../../winix/winixd/core/error.h groupinfo.o: ../../../../winix/winixd/core/error.h
groupinfo.o: ../../../../winix/winixd/db/dbitemquery.h groupinfo.o: ../../../../winix/winixd/db/dbitemquery.h
groupinfo.o: ../../../../winix/winixd/core/item.h
groupinfo.o: ../../../../winix/winixd/db/dbitemcolumns.h groupinfo.o: ../../../../winix/winixd/db/dbitemcolumns.h
groupinfo.o: ../../../../winix/winixd/core/user.h groupinfo.o: ../../../../winix/winixd/core/user.h
groupinfo.o: ../../../../winix/winixd/core/group.h groupinfo.o: ../../../../winix/winixd/core/group.h
@ -107,9 +106,10 @@ groupinfo.o: ../../../../winix/winixd/templates/patterns.h
groupinfo.o: ../../../../winix/winixd/templates/locale.h groupinfo.o: ../../../../winix/winixd/templates/locale.h
groupinfo.o: ../../../../winix/winixd/templates/localefilter.h groupinfo.o: ../../../../winix/winixd/templates/localefilter.h
groupinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h groupinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
groupinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h groupinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
groupinfo.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h groupinfo.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
groupinfo.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h groupinfo.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
groupinfo.o: ../../../../ezc/src/pattern.h
groupinfo.o: ../../../../ezc/src/expressionparser.h groupinfo.o: ../../../../ezc/src/expressionparser.h
groupinfo.o: ../../../../ezc/src/patternparser.h groupinfo.o: ../../../../ezc/src/patternparser.h
groupinfo.o: ../../../../winix/winixd/notify/notifythread.h groupinfo.o: ../../../../winix/winixd/notify/notifythread.h
@ -153,11 +153,11 @@ groups.o: ../../../../winix/winixd/core/plugin.h
groups.o: ../../../../winix/winixd/core/pluginmsg.h groups.o: ../../../../winix/winixd/core/pluginmsg.h
groups.o: ../../../../winix/winixd/core/plugindata.h groups.o: ../../../../winix/winixd/core/plugindata.h
groups.o: ../../../../winix/winixd/core/winixbase.h groups.o: ../../../../winix/winixd/core/winixbase.h
groups.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h groups.o: ../../../../morm/src/modelconnector.h
groups.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
groups.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h groups.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
groups.o: ../../../../morm/src/queryresult.h groups.o: ../../../../morm/src/queryresult.h
groups.o: ../../../../morm/src/flatconnector.h groups.o: ../../../../morm/src/flatconnector.h ../../../../morm/src/morm.h
groups.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h
groups.o: ../../../../morm/src/dbexpression.h groups.o: ../../../../morm/src/dbexpression.h
groups.o: ../../../../morm/src/baseexpression.h groups.o: ../../../../morm/src/baseexpression.h
groups.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h groups.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
@ -176,8 +176,9 @@ groups.o: ../../../../winix/winixd/core/job.h
groups.o: ../../../../winix/winixd/core/basethread.h groups.o: ../../../../winix/winixd/core/basethread.h
groups.o: ../../../../winix/winixd/core/winixmodel.h groups.o: ../../../../winix/winixd/core/winixmodel.h
groups.o: ../../../../winix/winixd/core/dirs.h groups.o: ../../../../winix/winixd/core/dirs.h
groups.o: ../../../../winix/winixd/core/item.h
groups.o: ../../../../winix/winixd/core/dircontainer.h groups.o: ../../../../winix/winixd/core/dircontainer.h
groups.o: ../../../../winix/winixd/models/item.h
groups.o: ../../../../winix/winixd/models/itemcontent.h
groups.o: ../../../../winix/winixd/db/db.h groups.o: ../../../../winix/winixd/db/db.h
groups.o: ../../../../winix/winixd/db/dbbase.h groups.o: ../../../../winix/winixd/db/dbbase.h
groups.o: ../../../../winix/winixd/db/dbconn.h groups.o: ../../../../winix/winixd/db/dbconn.h
@ -193,7 +194,6 @@ groups.o: ../../../../pikotools/convert/strtoint.h
groups.o: ../../../../pikotools/convert/text.h groups.o: ../../../../pikotools/convert/text.h
groups.o: ../../../../winix/winixd/core/error.h groups.o: ../../../../winix/winixd/core/error.h
groups.o: ../../../../winix/winixd/db/dbitemquery.h groups.o: ../../../../winix/winixd/db/dbitemquery.h
groups.o: ../../../../winix/winixd/core/item.h
groups.o: ../../../../winix/winixd/db/dbitemcolumns.h groups.o: ../../../../winix/winixd/db/dbitemcolumns.h
groups.o: ../../../../winix/winixd/core/user.h groups.o: ../../../../winix/winixd/core/user.h
groups.o: ../../../../winix/winixd/core/group.h groups.o: ../../../../winix/winixd/core/group.h
@ -230,9 +230,10 @@ groups.o: ../../../../winix/winixd/templates/patterns.h
groups.o: ../../../../winix/winixd/templates/locale.h groups.o: ../../../../winix/winixd/templates/locale.h
groups.o: ../../../../winix/winixd/templates/localefilter.h groups.o: ../../../../winix/winixd/templates/localefilter.h
groups.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h groups.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
groups.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h groups.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
groups.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h groups.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
groups.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h groups.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
groups.o: ../../../../ezc/src/pattern.h
groups.o: ../../../../ezc/src/expressionparser.h groups.o: ../../../../ezc/src/expressionparser.h
groups.o: ../../../../ezc/src/patternparser.h groups.o: ../../../../ezc/src/patternparser.h
groups.o: ../../../../winix/winixd/notify/notifythread.h groups.o: ../../../../winix/winixd/notify/notifythread.h
@ -253,7 +254,18 @@ init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/plugin.h init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../winix/winixd/core/winixbase.h groupinfo.h groups.h init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../morm/src/dbconnector.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/log/log.h ../../../../pikotools/log/filelog.h
init.o: ../../../../morm/src/queryresult.h
init.o: ../../../../morm/src/flatconnector.h groupinfo.h groups.h
init.o: ../../../../pikotools/space/spaceparser.h init.o: ../../../../pikotools/space/spaceparser.h
init.o: ../../../../pikotools/space/space.h init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h init.o: ../../../../pikotools/textstream/types.h
@ -264,22 +276,12 @@ init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../winix/winixd/core/config.h init.o: ../../../../winix/winixd/core/config.h
init.o: ../../../../winix/winixd/core/log.h init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/logmanipulators.h init.o: ../../../../winix/winixd/core/logmanipulators.h
init.o: ../../../../pikotools/log/log.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h ../../../../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/log/filelog.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/filelog.h init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/lock.h init.o: ../../../../winix/winixd/core/lock.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h init.o: ../../../../morm/src/morm_types.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/dbexpression.h
init.o: ../../../../morm/src/baseexpression.h ../../../../morm/src/modelenv.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/modeldata.h ../../../../morm/src/cursorhelper.h
@ -297,8 +299,9 @@ init.o: ../../../../winix/winixd/core/job.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
init.o: ../../../../winix/winixd/core/winixmodel.h init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/dirs.h init.o: ../../../../winix/winixd/core/dirs.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/models/item.h
init.o: ../../../../winix/winixd/models/itemcontent.h
init.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.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/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
@ -313,7 +316,6 @@ init.o: ../../../../pikotools/convert/strtoint.h
init.o: ../../../../pikotools/convert/text.h init.o: ../../../../pikotools/convert/text.h
init.o: ../../../../winix/winixd/core/error.h init.o: ../../../../winix/winixd/core/error.h
init.o: ../../../../winix/winixd/db/dbitemquery.h init.o: ../../../../winix/winixd/db/dbitemquery.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/db/dbitemcolumns.h init.o: ../../../../winix/winixd/db/dbitemcolumns.h
init.o: ../../../../winix/winixd/core/user.h init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
@ -350,10 +352,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
@ -417,14 +419,13 @@ init.o: ../../../../winix/winixd/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h init.o: ../../../../winix/winixd/core/htmlfilter.h
templates.o: ../../../../winix/winixd/templates/templates.h templates.o: ../../../../winix/winixd/templates/templates.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../pikotools/utf8/utf8.h templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../pikotools/textstream/textstream.h templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../pikotools/membuffer/membuffer.h templates.o: ../../../../pikotools/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
@ -442,7 +443,6 @@ templates.o: ../../../../pikotools/convert/patternreplacer.h
templates.o: ../../../../pikotools/convert/strtoint.h templates.o: ../../../../pikotools/convert/strtoint.h
templates.o: ../../../../pikotools/convert/text.h templates.o: ../../../../pikotools/convert/text.h
templates.o: ../../../../winix/winixd/templates/patterncacher.h templates.o: ../../../../winix/winixd/templates/patterncacher.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/core/config.h templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../pikotools/space/spaceparser.h templates.o: ../../../../pikotools/space/spaceparser.h
@ -455,6 +455,22 @@ templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/filelog.h templates.o: ../../../../winix/winixd/core/filelog.h
templates.o: ../../../../winix/winixd/core/lock.h templates.o: ../../../../winix/winixd/core/lock.h
templates.o: ../../../../winix/winixd/core/synchro.h templates.o: ../../../../winix/winixd/core/synchro.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/templates/indexpatterns.h templates.o: ../../../../winix/winixd/templates/indexpatterns.h
templates.o: ../../../../winix/winixd/templates/patterns.h templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/locale.h templates.o: ../../../../winix/winixd/templates/locale.h
@ -506,21 +522,8 @@ templates.o: ../../../../winix/winixd/core/winixsystem.h
templates.o: ../../../../winix/winixd/core/winixmodel.h templates.o: ../../../../winix/winixd/core/winixmodel.h
templates.o: ../../../../winix/winixd/core/plugin.h templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h templates.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
templates.o: ../../../../morm/src/model.h templates.o: ../../../../morm/src/cursor.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/jsonexpression.h templates.o: ../../../../morm/src/jsonexpression.h
templates.o: ../../../../morm/src/postgresqlexpression.h templates.o: ../../../../morm/src/postgresqlexpression.h
templates.o: ../../../../morm/src/jsonconnector.h templates.o: ../../../../morm/src/jsonconnector.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2014, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -173,7 +173,7 @@ void GroupInfo::ReadGroupsConf(Mounts & mounts, bool skip_existing_configs)
groups_wrap[mount.dir_id].file_name = file_name; groups_wrap[mount.dir_id].file_name = file_name;
groups_wrap[mount.dir_id].groups.set_dependency(this); groups_wrap[mount.dir_id].groups.set_dependency(this);
if( !ParseGroups(config_file.content, groups_wrap[mount.dir_id].groups) ) if( !ParseGroups(config_file.item_content.content_raw, groups_wrap[mount.dir_id].groups) )
groups_wrap[mount.dir_id].to_delete = true; groups_wrap[mount.dir_id].to_delete = true;
} }
else else

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2014, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,10 +39,10 @@
#include <vector> #include <vector>
#include "groups.h" #include "groups.h"
#include "space/spaceparser.h" #include "space/spaceparser.h"
#include "core/item.h"
#include "core/system.h" #include "core/system.h"
#include "core/config.h" #include "core/config.h"
#include "core/winixrequest.h" #include "core/winixrequest.h"
#include "models/item.h"
namespace Winix namespace Winix

View File

@ -2,20 +2,18 @@
funregistermail_showusers.o: funregistermail_showusers.h funregistermail_showusers.o: funregistermail_showusers.h
funregistermail_showusers.o: ../../../../winix/winixd/functions/functionbase.h funregistermail_showusers.o: ../../../../winix/winixd/functions/functionbase.h
funregistermail_showusers.o: ../../../../winix/winixd/core/item.h
funregistermail_showusers.o: ../../../../pikotools/space/space.h
funregistermail_showusers.o: ../../../../pikotools/textstream/types.h
funregistermail_showusers.o: ../../../../pikotools/date/date.h
funregistermail_showusers.o: ../../../../pikotools/convert/inttostr.h
funregistermail_showusers.o: ../../../../winix/winixd/db/db.h funregistermail_showusers.o: ../../../../winix/winixd/db/db.h
funregistermail_showusers.o: ../../../../winix/winixd/db/dbbase.h funregistermail_showusers.o: ../../../../winix/winixd/db/dbbase.h
funregistermail_showusers.o: ../../../../winix/winixd/db/dbconn.h funregistermail_showusers.o: ../../../../winix/winixd/db/dbconn.h
funregistermail_showusers.o: ../../../../winix/winixd/db/dbtextstream.h funregistermail_showusers.o: ../../../../winix/winixd/db/dbtextstream.h
funregistermail_showusers.o: ../../../../winix/winixd/core/textstream.h funregistermail_showusers.o: ../../../../winix/winixd/core/textstream.h
funregistermail_showusers.o: ../../../../winix/winixd/core/misc.h funregistermail_showusers.o: ../../../../winix/winixd/core/misc.h
funregistermail_showusers.o: ../../../../winix/winixd/core/item.h
funregistermail_showusers.o: ../../../../winix/winixd/core/requesttypes.h funregistermail_showusers.o: ../../../../winix/winixd/core/requesttypes.h
funregistermail_showusers.o: ../../../../pikotools/textstream/textstream.h funregistermail_showusers.o: ../../../../pikotools/textstream/textstream.h
funregistermail_showusers.o: ../../../../pikotools/space/space.h
funregistermail_showusers.o: ../../../../pikotools/textstream/types.h
funregistermail_showusers.o: ../../../../pikotools/date/date.h
funregistermail_showusers.o: ../../../../pikotools/convert/inttostr.h
funregistermail_showusers.o: ../../../../pikotools/membuffer/membuffer.h funregistermail_showusers.o: ../../../../pikotools/membuffer/membuffer.h
funregistermail_showusers.o: ../../../../pikotools/textstream/types.h funregistermail_showusers.o: ../../../../pikotools/textstream/types.h
funregistermail_showusers.o: ../../../../pikotools/utf8/utf8.h funregistermail_showusers.o: ../../../../pikotools/utf8/utf8.h
@ -45,6 +43,23 @@ funregistermail_showusers.o: ../../../../winix/winixd/core/user.h
funregistermail_showusers.o: ../../../../winix/winixd/core/group.h funregistermail_showusers.o: ../../../../winix/winixd/core/group.h
funregistermail_showusers.o: ../../../../winix/winixd/core/dircontainer.h funregistermail_showusers.o: ../../../../winix/winixd/core/dircontainer.h
funregistermail_showusers.o: ../../../../winix/winixd/core/winixbase.h funregistermail_showusers.o: ../../../../winix/winixd/core/winixbase.h
funregistermail_showusers.o: ../../../../winix/winixd/models/item.h
funregistermail_showusers.o: ../../../../morm/src/model.h
funregistermail_showusers.o: ../../../../morm/src/modelconnector.h
funregistermail_showusers.o: ../../../../morm/src/clearer.h
funregistermail_showusers.o: ../../../../morm/src/dbconnector.h
funregistermail_showusers.o: ../../../../morm/src/queryresult.h
funregistermail_showusers.o: ../../../../morm/src/flatconnector.h
funregistermail_showusers.o: ../../../../morm/src/dbexpression.h
funregistermail_showusers.o: ../../../../morm/src/baseexpression.h
funregistermail_showusers.o: ../../../../morm/src/morm_types.h
funregistermail_showusers.o: ../../../../morm/src/modelenv.h
funregistermail_showusers.o: ../../../../morm/src/modeldata.h
funregistermail_showusers.o: ../../../../morm/src/cursorhelper.h
funregistermail_showusers.o: ../../../../morm/src/finderhelper.h
funregistermail_showusers.o: ../../../../morm/src/fieldvaluehelper.h
funregistermail_showusers.o: ../../../../morm/src/flatexpression.h
funregistermail_showusers.o: ../../../../winix/winixd/models/itemcontent.h
funregistermail_showusers.o: ../../../../winix/winixd/core/ugcontainer.h funregistermail_showusers.o: ../../../../winix/winixd/core/ugcontainer.h
funregistermail_showusers.o: ../../../../winix/winixd/core/request.h funregistermail_showusers.o: ../../../../winix/winixd/core/request.h
funregistermail_showusers.o: ../../../../winix/winixd/core/error.h funregistermail_showusers.o: ../../../../winix/winixd/core/error.h
@ -61,21 +76,6 @@ funregistermail_showusers.o: ../../../../winix/winixd/core/plugin.h
funregistermail_showusers.o: ../../../../winix/winixd/core/pluginmsg.h funregistermail_showusers.o: ../../../../winix/winixd/core/pluginmsg.h
funregistermail_showusers.o: ../../../../winix/winixd/core/plugindata.h funregistermail_showusers.o: ../../../../winix/winixd/core/plugindata.h
funregistermail_showusers.o: ../../../../morm/src/morm.h funregistermail_showusers.o: ../../../../morm/src/morm.h
funregistermail_showusers.o: ../../../../morm/src/morm_types.h
funregistermail_showusers.o: ../../../../morm/src/model.h
funregistermail_showusers.o: ../../../../morm/src/modelconnector.h
funregistermail_showusers.o: ../../../../morm/src/clearer.h
funregistermail_showusers.o: ../../../../morm/src/dbconnector.h
funregistermail_showusers.o: ../../../../morm/src/queryresult.h
funregistermail_showusers.o: ../../../../morm/src/flatconnector.h
funregistermail_showusers.o: ../../../../morm/src/dbexpression.h
funregistermail_showusers.o: ../../../../morm/src/baseexpression.h
funregistermail_showusers.o: ../../../../morm/src/modelenv.h
funregistermail_showusers.o: ../../../../morm/src/modeldata.h
funregistermail_showusers.o: ../../../../morm/src/cursorhelper.h
funregistermail_showusers.o: ../../../../morm/src/finderhelper.h
funregistermail_showusers.o: ../../../../morm/src/fieldvaluehelper.h
funregistermail_showusers.o: ../../../../morm/src/flatexpression.h
funregistermail_showusers.o: ../../../../morm/src/finder.h funregistermail_showusers.o: ../../../../morm/src/finder.h
funregistermail_showusers.o: ../../../../morm/src/cursor.h funregistermail_showusers.o: ../../../../morm/src/cursor.h
funregistermail_showusers.o: ../../../../morm/src/jsonexpression.h funregistermail_showusers.o: ../../../../morm/src/jsonexpression.h
@ -114,6 +114,7 @@ funregistermail_showusers.o: ../../../../winix/winixd/templates/localefilter.h
funregistermail_showusers.o: ../../../../ezc/src/ezc.h funregistermail_showusers.o: ../../../../ezc/src/ezc.h
funregistermail_showusers.o: ../../../../ezc/src/generator.h funregistermail_showusers.o: ../../../../ezc/src/generator.h
funregistermail_showusers.o: ../../../../ezc/src/blocks.h funregistermail_showusers.o: ../../../../ezc/src/blocks.h
funregistermail_showusers.o: ../../../../ezc/src/item.h
funregistermail_showusers.o: ../../../../ezc/src/cache.h funregistermail_showusers.o: ../../../../ezc/src/cache.h
funregistermail_showusers.o: ../../../../ezc/src/functions.h funregistermail_showusers.o: ../../../../ezc/src/functions.h
funregistermail_showusers.o: ../../../../ezc/src/funinfo.h funregistermail_showusers.o: ../../../../ezc/src/funinfo.h
@ -144,20 +145,18 @@ funregistermail_showusers.o: ../../../../winix/winixd/db/dbbase.h
funregistermail_showusers.o: ../../../../winix/winixd/core/dirs.h funregistermail_showusers.o: ../../../../winix/winixd/core/dirs.h
funregistermail.o: funregistermail.h funregistermail.o: funregistermail.h
funregistermail.o: ../../../../winix/winixd/functions/functionbase.h funregistermail.o: ../../../../winix/winixd/functions/functionbase.h
funregistermail.o: ../../../../winix/winixd/core/item.h
funregistermail.o: ../../../../pikotools/space/space.h
funregistermail.o: ../../../../pikotools/textstream/types.h
funregistermail.o: ../../../../pikotools/date/date.h
funregistermail.o: ../../../../pikotools/convert/inttostr.h
funregistermail.o: ../../../../winix/winixd/db/db.h funregistermail.o: ../../../../winix/winixd/db/db.h
funregistermail.o: ../../../../winix/winixd/db/dbbase.h funregistermail.o: ../../../../winix/winixd/db/dbbase.h
funregistermail.o: ../../../../winix/winixd/db/dbconn.h funregistermail.o: ../../../../winix/winixd/db/dbconn.h
funregistermail.o: ../../../../winix/winixd/db/dbtextstream.h funregistermail.o: ../../../../winix/winixd/db/dbtextstream.h
funregistermail.o: ../../../../winix/winixd/core/textstream.h funregistermail.o: ../../../../winix/winixd/core/textstream.h
funregistermail.o: ../../../../winix/winixd/core/misc.h funregistermail.o: ../../../../winix/winixd/core/misc.h
funregistermail.o: ../../../../winix/winixd/core/item.h
funregistermail.o: ../../../../winix/winixd/core/requesttypes.h funregistermail.o: ../../../../winix/winixd/core/requesttypes.h
funregistermail.o: ../../../../pikotools/textstream/textstream.h funregistermail.o: ../../../../pikotools/textstream/textstream.h
funregistermail.o: ../../../../pikotools/space/space.h
funregistermail.o: ../../../../pikotools/textstream/types.h
funregistermail.o: ../../../../pikotools/date/date.h
funregistermail.o: ../../../../pikotools/convert/inttostr.h
funregistermail.o: ../../../../pikotools/membuffer/membuffer.h funregistermail.o: ../../../../pikotools/membuffer/membuffer.h
funregistermail.o: ../../../../pikotools/textstream/types.h funregistermail.o: ../../../../pikotools/textstream/types.h
funregistermail.o: ../../../../pikotools/utf8/utf8.h funregistermail.o: ../../../../pikotools/utf8/utf8.h
@ -187,6 +186,23 @@ funregistermail.o: ../../../../winix/winixd/core/user.h
funregistermail.o: ../../../../winix/winixd/core/group.h funregistermail.o: ../../../../winix/winixd/core/group.h
funregistermail.o: ../../../../winix/winixd/core/dircontainer.h funregistermail.o: ../../../../winix/winixd/core/dircontainer.h
funregistermail.o: ../../../../winix/winixd/core/winixbase.h funregistermail.o: ../../../../winix/winixd/core/winixbase.h
funregistermail.o: ../../../../winix/winixd/models/item.h
funregistermail.o: ../../../../morm/src/model.h
funregistermail.o: ../../../../morm/src/modelconnector.h
funregistermail.o: ../../../../morm/src/clearer.h
funregistermail.o: ../../../../morm/src/dbconnector.h
funregistermail.o: ../../../../morm/src/queryresult.h
funregistermail.o: ../../../../morm/src/flatconnector.h
funregistermail.o: ../../../../morm/src/dbexpression.h
funregistermail.o: ../../../../morm/src/baseexpression.h
funregistermail.o: ../../../../morm/src/morm_types.h
funregistermail.o: ../../../../morm/src/modelenv.h
funregistermail.o: ../../../../morm/src/modeldata.h
funregistermail.o: ../../../../morm/src/cursorhelper.h
funregistermail.o: ../../../../morm/src/finderhelper.h
funregistermail.o: ../../../../morm/src/fieldvaluehelper.h
funregistermail.o: ../../../../morm/src/flatexpression.h
funregistermail.o: ../../../../winix/winixd/models/itemcontent.h
funregistermail.o: ../../../../winix/winixd/core/ugcontainer.h funregistermail.o: ../../../../winix/winixd/core/ugcontainer.h
funregistermail.o: ../../../../winix/winixd/core/request.h funregistermail.o: ../../../../winix/winixd/core/request.h
funregistermail.o: ../../../../winix/winixd/core/error.h funregistermail.o: ../../../../winix/winixd/core/error.h
@ -202,23 +218,7 @@ funregistermail.o: ../../../../winix/winixd/core/winixmodel.h
funregistermail.o: ../../../../winix/winixd/core/plugin.h funregistermail.o: ../../../../winix/winixd/core/plugin.h
funregistermail.o: ../../../../winix/winixd/core/pluginmsg.h funregistermail.o: ../../../../winix/winixd/core/pluginmsg.h
funregistermail.o: ../../../../winix/winixd/core/plugindata.h funregistermail.o: ../../../../winix/winixd/core/plugindata.h
funregistermail.o: ../../../../morm/src/morm.h funregistermail.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
funregistermail.o: ../../../../morm/src/morm_types.h
funregistermail.o: ../../../../morm/src/model.h
funregistermail.o: ../../../../morm/src/modelconnector.h
funregistermail.o: ../../../../morm/src/clearer.h
funregistermail.o: ../../../../morm/src/dbconnector.h
funregistermail.o: ../../../../morm/src/queryresult.h
funregistermail.o: ../../../../morm/src/flatconnector.h
funregistermail.o: ../../../../morm/src/dbexpression.h
funregistermail.o: ../../../../morm/src/baseexpression.h
funregistermail.o: ../../../../morm/src/modelenv.h
funregistermail.o: ../../../../morm/src/modeldata.h
funregistermail.o: ../../../../morm/src/cursorhelper.h
funregistermail.o: ../../../../morm/src/finderhelper.h
funregistermail.o: ../../../../morm/src/fieldvaluehelper.h
funregistermail.o: ../../../../morm/src/flatexpression.h
funregistermail.o: ../../../../morm/src/finder.h
funregistermail.o: ../../../../morm/src/cursor.h funregistermail.o: ../../../../morm/src/cursor.h
funregistermail.o: ../../../../morm/src/jsonexpression.h funregistermail.o: ../../../../morm/src/jsonexpression.h
funregistermail.o: ../../../../morm/src/postgresqlexpression.h funregistermail.o: ../../../../morm/src/postgresqlexpression.h
@ -254,7 +254,8 @@ funregistermail.o: ../../../../winix/winixd/templates/patterns.h
funregistermail.o: ../../../../winix/winixd/templates/locale.h funregistermail.o: ../../../../winix/winixd/templates/locale.h
funregistermail.o: ../../../../winix/winixd/templates/localefilter.h funregistermail.o: ../../../../winix/winixd/templates/localefilter.h
funregistermail.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h funregistermail.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
funregistermail.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h funregistermail.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
funregistermail.o: ../../../../ezc/src/cache.h
funregistermail.o: ../../../../ezc/src/functions.h funregistermail.o: ../../../../ezc/src/functions.h
funregistermail.o: ../../../../ezc/src/funinfo.h funregistermail.o: ../../../../ezc/src/funinfo.h
funregistermail.o: ../../../../ezc/src/objects.h funregistermail.o: ../../../../ezc/src/objects.h
@ -284,25 +285,28 @@ init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/plugin.h init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../winix/winixd/core/winixbase.h mdb.h init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../morm/src/dbconnector.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/log/log.h ../../../../pikotools/log/filelog.h
init.o: ../../../../morm/src/queryresult.h
init.o: ../../../../morm/src/flatconnector.h mdb.h
init.o: ../../../../winix/winixd/db/dbbase.h init.o: ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/core/dirs.h funregistermail.h init.o: ../../../../winix/winixd/core/dirs.h funregistermail.h
init.o: ../../../../winix/winixd/functions/functionbase.h init.o: ../../../../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/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbconn.h init.o: ../../../../winix/winixd/db/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/textstream.h init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../winix/winixd/core/misc.h init.o: ../../../../winix/winixd/core/misc.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/requesttypes.h init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.h init.o: ../../../../pikotools/utf8/utf8.h
init.o: ../../../../winix/winixd/core/winix_const.h init.o: ../../../../winix/winixd/core/winix_const.h
init.o: ../../../../pikotools/convert/convert.h init.o: ../../../../pikotools/convert/convert.h
@ -316,7 +320,6 @@ init.o: ../../../../pikotools/space/spaceparser.h
init.o: ../../../../pikotools/space/space.h init.o: ../../../../pikotools/space/space.h
init.o: ../../../../winix/winixd/core/log.h init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/logmanipulators.h init.o: ../../../../winix/winixd/core/logmanipulators.h
init.o: ../../../../pikotools/log/log.h ../../../../pikotools/log/filelog.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/filelog.h init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/lock.h init.o: ../../../../winix/winixd/core/lock.h
@ -327,6 +330,15 @@ init.o: ../../../../winix/winixd/db/dbitemcolumns.h
init.o: ../../../../winix/winixd/core/user.h init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.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/ugcontainer.h
init.o: ../../../../winix/winixd/core/request.h init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.h init.o: ../../../../winix/winixd/core/error.h
@ -340,17 +352,8 @@ init.o: ../../../../winix/winixd/core/job.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
init.o: ../../../../winix/winixd/core/winixmodel.h init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h init.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h init.o: ../../../../morm/src/jsonexpression.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 ../../../../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/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h init.o: ../../../../morm/src/jsonconnector.h
init.o: ../../../../morm/src/postgresqlconnector.h init.o: ../../../../morm/src/postgresqlconnector.h
@ -384,10 +387,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
@ -458,9 +461,8 @@ mdb.o: ../../../../winix/winixd/core/log.h
registermail_info.o: registermail_info.h registermail_info.o: registermail_info.h
templates.o: ../../../../winix/winixd/templates/templates.h templates.o: ../../../../winix/winixd/templates/templates.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../winix/winixd/core/item.h ../../../../ezc/src/cache.h templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../ezc/src/functions.h
templates.o: ../../../../pikotools/utf8/utf8.h templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../pikotools/textstream/textstream.h templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/space/space.h templates.o: ../../../../pikotools/space/space.h
@ -484,7 +486,6 @@ templates.o: ../../../../pikotools/convert/patternreplacer.h
templates.o: ../../../../pikotools/convert/strtoint.h templates.o: ../../../../pikotools/convert/strtoint.h
templates.o: ../../../../pikotools/convert/text.h templates.o: ../../../../pikotools/convert/text.h
templates.o: ../../../../winix/winixd/templates/patterncacher.h templates.o: ../../../../winix/winixd/templates/patterncacher.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/core/config.h templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../pikotools/space/spaceparser.h templates.o: ../../../../pikotools/space/spaceparser.h
@ -496,6 +497,22 @@ templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/filelog.h templates.o: ../../../../winix/winixd/core/filelog.h
templates.o: ../../../../winix/winixd/core/lock.h templates.o: ../../../../winix/winixd/core/lock.h
templates.o: ../../../../winix/winixd/core/synchro.h templates.o: ../../../../winix/winixd/core/synchro.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/templates/indexpatterns.h templates.o: ../../../../winix/winixd/templates/indexpatterns.h
templates.o: ../../../../winix/winixd/templates/patterns.h templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/locale.h templates.o: ../../../../winix/winixd/templates/locale.h
@ -512,21 +529,8 @@ templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h templates.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
templates.o: ../../../../morm/src/model.h templates.o: ../../../../morm/src/cursor.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/jsonexpression.h templates.o: ../../../../morm/src/jsonexpression.h
templates.o: ../../../../morm/src/postgresqlexpression.h templates.o: ../../../../morm/src/postgresqlexpression.h
templates.o: ../../../../morm/src/jsonconnector.h templates.o: ../../../../morm/src/jsonconnector.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2016-2018, Tomasz Sowa * Copyright (c) 2016-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -77,7 +77,7 @@ void ReloadConfigFile(PluginInfo & info, Item & file)
PT::SpaceParser parser; PT::SpaceParser parser;
parser.SetSpace(space); parser.SetSpace(space);
PT::SpaceParser::Status status = parser.ParseString(file.content); PT::SpaceParser::Status status = parser.ParseString(file.item_content.content_raw);
if( status == PT::SpaceParser::syntax_error ) if( status == PT::SpaceParser::syntax_error )
{ {
@ -118,13 +118,23 @@ void ConfigReload(PluginInfo & info)
if( dir ) if( dir )
{ {
DbItemQuery iq; // DbItemQuery iq;
std::vector<Item> items; std::vector<Item> items;
//
// iq.SetAll(true, false);
// iq.WhereParentId(dir->id);
iq.SetAll(true, false); // CHECKME is it correct to get connector from the last item?
iq.WhereParentId(dir->id); morm::ModelConnector * model_connector = info.cur->request->last_item->get_connector();
morm::Finder<Item> finder(model_connector);
info.db->GetItems(items, iq); finder.
select().
where().
eq(L"parent_id", dir->id).
get_vector(items);
//info.db->GetItems(items, iq);
for(Item & item : items) for(Item & item : items)
{ {

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2016, Tomasz Sowa * Copyright (c) 2016-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -34,12 +34,12 @@
#include "templates/templates.h" #include "templates/templates.h"
#include "core/plugin.h" #include "core/plugin.h"
#include "core/item.h"
#include "core/log.h" #include "core/log.h"
#include "core/misc.h" #include "core/misc.h"
#include "cache.h" #include "cache.h"
#include "templates/miscspace.h" #include "templates/miscspace.h"
#include "registermail_info.h" #include "registermail_info.h"
#include "models/item.h"
namespace Winix namespace Winix

View File

@ -1,21 +1,19 @@
# DO NOT DELETE # DO NOT DELETE
cache.o: cache.h ../../../../winix/winixd/core/item.h cache.o: cache.h ../../../../winix/winixd/core/dirs.h
cache.o: ../../../../pikotools/space/space.h
cache.o: ../../../../pikotools/textstream/types.h
cache.o: ../../../../pikotools/date/date.h
cache.o: ../../../../pikotools/convert/inttostr.h
cache.o: ../../../../winix/winixd/core/dirs.h
cache.o: ../../../../winix/winixd/core/item.h
cache.o: ../../../../winix/winixd/core/dircontainer.h cache.o: ../../../../winix/winixd/core/dircontainer.h
cache.o: ../../../../winix/winixd/core/winixbase.h cache.o: ../../../../winix/winixd/core/winixbase.h
cache.o: ../../../../winix/winixd/core/config.h cache.o: ../../../../winix/winixd/core/config.h
cache.o: ../../../../pikotools/space/spaceparser.h cache.o: ../../../../pikotools/space/spaceparser.h
cache.o: ../../../../pikotools/space/space.h cache.o: ../../../../pikotools/space/space.h
cache.o: ../../../../pikotools/textstream/types.h
cache.o: ../../../../winix/winixd/core/log.h cache.o: ../../../../winix/winixd/core/log.h
cache.o: ../../../../winix/winixd/core/logmanipulators.h cache.o: ../../../../winix/winixd/core/logmanipulators.h
cache.o: ../../../../pikotools/log/log.h cache.o: ../../../../pikotools/log/log.h
cache.o: ../../../../pikotools/textstream/textstream.h cache.o: ../../../../pikotools/textstream/textstream.h
cache.o: ../../../../pikotools/space/space.h
cache.o: ../../../../pikotools/date/date.h
cache.o: ../../../../pikotools/convert/inttostr.h
cache.o: ../../../../pikotools/membuffer/membuffer.h cache.o: ../../../../pikotools/membuffer/membuffer.h
cache.o: ../../../../pikotools/textstream/types.h cache.o: ../../../../pikotools/textstream/types.h
cache.o: ../../../../pikotools/log/filelog.h cache.o: ../../../../pikotools/log/filelog.h
@ -24,6 +22,19 @@ cache.o: ../../../../winix/winixd/core/synchro.h
cache.o: ../../../../winix/winixd/core/filelog.h cache.o: ../../../../winix/winixd/core/filelog.h
cache.o: ../../../../winix/winixd/core/lock.h cache.o: ../../../../winix/winixd/core/lock.h
cache.o: ../../../../winix/winixd/core/synchro.h cache.o: ../../../../winix/winixd/core/synchro.h
cache.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.h
cache.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
cache.o: ../../../../morm/src/dbconnector.h
cache.o: ../../../../morm/src/queryresult.h
cache.o: ../../../../morm/src/flatconnector.h
cache.o: ../../../../morm/src/dbexpression.h
cache.o: ../../../../morm/src/baseexpression.h
cache.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
cache.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
cache.o: ../../../../morm/src/finderhelper.h
cache.o: ../../../../morm/src/fieldvaluehelper.h
cache.o: ../../../../morm/src/flatexpression.h
cache.o: ../../../../winix/winixd/models/itemcontent.h
cache.o: ../../../../winix/winixd/db/db.h cache.o: ../../../../winix/winixd/db/db.h
cache.o: ../../../../winix/winixd/db/dbbase.h cache.o: ../../../../winix/winixd/db/dbbase.h
cache.o: ../../../../winix/winixd/db/dbconn.h cache.o: ../../../../winix/winixd/db/dbconn.h
@ -57,18 +68,7 @@ cache.o: ../../../../winix/winixd/core/winixmodel.h
cache.o: ../../../../winix/winixd/core/plugin.h cache.o: ../../../../winix/winixd/core/plugin.h
cache.o: ../../../../winix/winixd/core/pluginmsg.h cache.o: ../../../../winix/winixd/core/pluginmsg.h
cache.o: ../../../../winix/winixd/core/plugindata.h cache.o: ../../../../winix/winixd/core/plugindata.h
cache.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h cache.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
cache.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
cache.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
cache.o: ../../../../morm/src/queryresult.h
cache.o: ../../../../morm/src/flatconnector.h
cache.o: ../../../../morm/src/dbexpression.h
cache.o: ../../../../morm/src/baseexpression.h
cache.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
cache.o: ../../../../morm/src/cursorhelper.h
cache.o: ../../../../morm/src/finderhelper.h
cache.o: ../../../../morm/src/fieldvaluehelper.h
cache.o: ../../../../morm/src/flatexpression.h ../../../../morm/src/finder.h
cache.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h cache.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
cache.o: ../../../../morm/src/postgresqlexpression.h cache.o: ../../../../morm/src/postgresqlexpression.h
cache.o: ../../../../morm/src/jsonconnector.h cache.o: ../../../../morm/src/jsonconnector.h
@ -83,13 +83,12 @@ init.o: ../../../../winix/winixd/core/winixbase.h
init.o: ../../../../winix/winixd/core/config.h init.o: ../../../../winix/winixd/core/config.h
init.o: ../../../../pikotools/space/spaceparser.h init.o: ../../../../pikotools/space/spaceparser.h
init.o: ../../../../pikotools/space/space.h init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../winix/winixd/core/log.h init.o: ../../../../winix/winixd/core/log.h
init.o: ../../../../winix/winixd/core/logmanipulators.h init.o: ../../../../winix/winixd/core/logmanipulators.h
init.o: ../../../../pikotools/log/log.h init.o: ../../../../pikotools/log/log.h
init.o: ../../../../pikotools/textstream/textstream.h init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h init.o: ../../../../pikotools/space/space.h ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/date/date.h
init.o: ../../../../pikotools/convert/inttostr.h init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../pikotools/membuffer/membuffer.h init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h init.o: ../../../../pikotools/textstream/types.h
@ -97,11 +96,21 @@ init.o: ../../../../pikotools/log/filelog.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/filelog.h init.o: ../../../../winix/winixd/core/filelog.h
init.o: ../../../../winix/winixd/core/lock.h init.o: ../../../../winix/winixd/core/lock.h
init.o: ../../../../winix/winixd/core/synchro.h cache.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/item.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 cache.h
init.o: ../../../../winix/winixd/core/dirs.h init.o: ../../../../winix/winixd/core/dirs.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.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/db/db.h ../../../../winix/winixd/db/dbbase.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/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
@ -132,26 +141,18 @@ init.o: ../../../../pikotools/space/spacetojson.h
init.o: ../../../../ezc/src/outstreams.h init.o: ../../../../ezc/src/outstreams.h
init.o: ../../../../winix/winixd/core/winixmodel.h init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h init.o: ../../../../winix/winixd/core/plugin.h ../../../../morm/src/morm.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h init.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h init.o: ../../../../morm/src/jsonexpression.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 ../../../../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/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h init.o: ../../../../morm/src/jsonconnector.h
init.o: ../../../../morm/src/postgresqlconnector.h init.o: ../../../../morm/src/postgresqlconnector.h
init.o: ../../../../morm/src/postgresqlqueryresult.h init.o: ../../../../morm/src/postgresqlqueryresult.h
init.o: ../../../../winix/winixd/templates/templates.h init.o: ../../../../winix/winixd/templates/templates.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/templates/patterncacher.h init.o: ../../../../winix/winixd/templates/patterncacher.h
init.o: ../../../../winix/winixd/templates/indexpatterns.h init.o: ../../../../winix/winixd/templates/indexpatterns.h
@ -252,23 +253,21 @@ init.o: ../../../../winix/winixd/functions/who.h
init.o: ../../../../winix/winixd/functions/vim.h init.o: ../../../../winix/winixd/functions/vim.h
templates.o: ../../../../winix/winixd/templates/templates.h templates.o: ../../../../winix/winixd/templates/templates.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h cache.h
templates.o: ../../../../winix/winixd/core/item.h cache.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/core/dirs.h templates.o: ../../../../winix/winixd/core/dirs.h
templates.o: ../../../../winix/winixd/core/dircontainer.h templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.h
templates.o: ../../../../winix/winixd/core/config.h templates.o: ../../../../winix/winixd/core/config.h
templates.o: ../../../../pikotools/space/spaceparser.h templates.o: ../../../../pikotools/space/spaceparser.h
templates.o: ../../../../pikotools/space/space.h templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../winix/winixd/core/log.h templates.o: ../../../../winix/winixd/core/log.h
templates.o: ../../../../winix/winixd/core/logmanipulators.h templates.o: ../../../../winix/winixd/core/logmanipulators.h
templates.o: ../../../../pikotools/log/log.h templates.o: ../../../../pikotools/log/log.h
templates.o: ../../../../pikotools/textstream/textstream.h templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../pikotools/membuffer/membuffer.h templates.o: ../../../../pikotools/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/log/filelog.h templates.o: ../../../../pikotools/log/filelog.h
@ -277,6 +276,22 @@ templates.o: ../../../../winix/winixd/core/synchro.h
templates.o: ../../../../winix/winixd/core/filelog.h templates.o: ../../../../winix/winixd/core/filelog.h
templates.o: ../../../../winix/winixd/core/lock.h templates.o: ../../../../winix/winixd/core/lock.h
templates.o: ../../../../winix/winixd/core/synchro.h templates.o: ../../../../winix/winixd/core/synchro.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/db/db.h templates.o: ../../../../winix/winixd/db/db.h
templates.o: ../../../../winix/winixd/db/dbbase.h templates.o: ../../../../winix/winixd/db/dbbase.h
templates.o: ../../../../winix/winixd/db/dbconn.h templates.o: ../../../../winix/winixd/db/dbconn.h
@ -310,21 +325,8 @@ templates.o: ../../../../winix/winixd/core/winixmodel.h
templates.o: ../../../../winix/winixd/core/plugin.h templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h templates.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
templates.o: ../../../../morm/src/model.h templates.o: ../../../../morm/src/cursor.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/jsonexpression.h templates.o: ../../../../morm/src/jsonexpression.h
templates.o: ../../../../morm/src/postgresqlexpression.h templates.o: ../../../../morm/src/postgresqlexpression.h
templates.o: ../../../../morm/src/jsonconnector.h templates.o: ../../../../morm/src/jsonconnector.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2012-2014, Tomasz Sowa * Copyright (c) 2012-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -38,8 +38,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <list> #include <list>
#include "core/item.h"
#include "core/dirs.h" #include "core/dirs.h"
#include "models/item.h"
namespace Winix namespace Winix
{ {

View File

@ -151,15 +151,15 @@ using namespace Menu;
// (not implemented yet) // (not implemented yet)
info.plugin->Assign(WINIX_FILE_REMOVED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_REMOVED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_DIR_ADDED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_DIR_ADDED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_DIR_PREPARE_TO_REMOVE, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_DIR_PREPARE_TO_REMOVE, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_DIR_REMOVED, InvalidateCacheById); info.plugin->Assign(WINIX_DIR_REMOVED, InvalidateCacheById);
info.plugin->Assign(WINIX_FILE_ADDED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_ADDED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_FILE_CHANGED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_CHANGED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_FILE_COPIED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_COPIED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_FILE_PREPARE_TO_MOVE, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_PREPARE_TO_MOVE, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_FILE_MOVED, InvalidateCacheByPointerParent); info.plugin->Assign(WINIX_FILE_MOVED, InvalidateCacheByPointerParent);
info.plugin->Assign(WINIX_DIR_CONTENT_SORTED, InvalidateCacheByPointer); info.plugin->Assign(WINIX_DIR_CONTENT_SORTED, InvalidateCacheByPointer);
info.plugin->Assign(WINIX_PROCESS_REQUEST, ProcessRequest); info.plugin->Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
// !! IMPROVE ME // !! IMPROVE ME

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2011-2016, Tomasz Sowa * Copyright (c) 2011-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -34,11 +34,12 @@
#include "templates/templates.h" #include "templates/templates.h"
#include "core/plugin.h" #include "core/plugin.h"
#include "core/item.h"
#include "core/log.h" #include "core/log.h"
#include "core/misc.h" #include "core/misc.h"
#include "cache.h" #include "cache.h"
#include "templates/miscspace.h" #include "templates/miscspace.h"
#include "models/item.h"
namespace Winix namespace Winix
{ {
@ -61,11 +62,12 @@ extern int mount_par_menu_skip;
extern Cache cache; extern Cache cache;
static Ezc::Stack * stack = &empty_stack; static Ezc::Stack * stack = &empty_stack;
static DbItemQuery iq; //static DbItemQuery iq;
static std::vector<Item> item_tab; static std::vector<Item> item_tab;
static MenuItem menu_item; static MenuItem menu_item;
struct StackItem : public Ezc::FunData struct StackItem : public Ezc::FunData
{ {
CacheItem * citem; CacheItem * citem;
@ -99,36 +101,53 @@ return WINIX_PL_MENU_PARAM_NONE;
} }
void read_from_db(long dir_id, int param, bool with_meta) void read_from_db(long dir_id, int param, bool with_meta)
{ {
iq.SetAll(false, false); // iq.SetAll(false, false);
iq.sel_subject = true; // iq.sel_subject = true;
iq.sel_url = true; // iq.sel_url = true;
iq.sel_sort_index = true; // iq.sel_sort_index = true;
iq.sort_date_asc = false; // !! FIXED ME we need an option for this // iq.sort_date_asc = false; // !! FIXED ME we need an option for this
iq.sel_type = true; // iq.sel_type = true;
iq.sel_file = true; // iq.sel_file = true;
iq.sel_meta = with_meta; // iq.sel_meta = with_meta;
iq.WhereParentId(dir_id); // iq.WhereParentId(dir_id);
// CHECKME is it correct to get the connector from last item?
morm::ModelConnector * model_connector = cur->request->last_item->get_connector();
morm::Finder<Item> finder(model_connector);
finder.
select().
where().
eq(L"parent_id", dir_id);
if( param == WINIX_PL_MENU_PARAM_IMAGES ) if( param == WINIX_PL_MENU_PARAM_IMAGES )
{ {
iq.WhereType(Item::file); // iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE); // iq.WhereFileType(WINIX_ITEM_FILETYPE_IMAGE);
finder.
eq(L"type", static_cast<int>(Item::file)).
eq(L"content.file_type", WINIX_ITEM_FILETYPE_IMAGE);
} }
else else
if( param == WINIX_PL_MENU_PARAM_DIRS ) if( param == WINIX_PL_MENU_PARAM_DIRS )
{ {
iq.WhereType(Item::dir); //iq.WhereType(Item::dir);
finder.eq(L"type", static_cast<int>(Item::dir));
} }
else else
if( param == WINIX_PL_MENU_PARAM_FILES ) if( param == WINIX_PL_MENU_PARAM_FILES )
{ {
iq.WhereType(Item::file); //iq.WhereType(Item::file);
finder.eq(L"type", static_cast<int>(Item::file));
} }
db->GetItems(item_tab, iq); finder.get_vector(item_tab);
//db->GetItems(item_tab, iq);
log << log4 << "Menu: loaded directories/files from the database for parent_id: " log << log4 << "Menu: loaded directories/files from the database for parent_id: "
<< dir_id << logend; << dir_id << logend;
} }
@ -190,9 +209,9 @@ void copy_items(CacheItem & citem)
menu_item.id = item_tab[i].id; menu_item.id = item_tab[i].id;
menu_item.subject = item_tab[i].subject; menu_item.subject = item_tab[i].subject;
menu_item.url = item_tab[i].url; menu_item.url = item_tab[i].url;
menu_item.meta = item_tab[i].meta; menu_item.meta = item_tab[i].item_content.meta;
menu_item.type = item_tab[i].type; menu_item.type = item_tab[i].type;
menu_item.file_type = item_tab[i].file_type; menu_item.file_type = item_tab[i].item_content.file_type;
citem.menu_items.push_back(menu_item); citem.menu_items.push_back(menu_item);
} }

View File

@ -1,19 +1,17 @@
# DO NOT DELETE # DO NOT DELETE
init.o: seo.h ../../../../winix/winixd/functions/functionbase.h init.o: seo.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/db.h ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/db/dbconn.h init.o: ../../../../winix/winixd/db/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/textstream.h init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../winix/winixd/core/misc.h init.o: ../../../../winix/winixd/core/misc.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/requesttypes.h init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../pikotools/textstream/textstream.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/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.h init.o: ../../../../pikotools/utf8/utf8.h
@ -42,6 +40,18 @@ init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/core/winixbase.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/ugcontainer.h
init.o: ../../../../winix/winixd/core/request.h init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.h init.o: ../../../../winix/winixd/core/error.h
@ -57,17 +67,7 @@ init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h init.o: ../../../../winix/winixd/core/pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h init.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.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/cursor.h ../../../../morm/src/jsonexpression.h init.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h init.o: ../../../../morm/src/jsonconnector.h
@ -102,10 +102,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
@ -170,19 +170,17 @@ init.o: ../../../../winix/winixd/functions/who.h
init.o: ../../../../winix/winixd/functions/vim.h init.o: ../../../../winix/winixd/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h init.o: ../../../../winix/winixd/core/htmlfilter.h
seo.o: seo.h ../../../../winix/winixd/functions/functionbase.h seo.o: seo.h ../../../../winix/winixd/functions/functionbase.h
seo.o: ../../../../winix/winixd/core/item.h
seo.o: ../../../../pikotools/space/space.h
seo.o: ../../../../pikotools/textstream/types.h
seo.o: ../../../../pikotools/date/date.h
seo.o: ../../../../pikotools/convert/inttostr.h
seo.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h seo.o: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.h
seo.o: ../../../../winix/winixd/db/dbconn.h seo.o: ../../../../winix/winixd/db/dbconn.h
seo.o: ../../../../winix/winixd/db/dbtextstream.h seo.o: ../../../../winix/winixd/db/dbtextstream.h
seo.o: ../../../../winix/winixd/core/textstream.h seo.o: ../../../../winix/winixd/core/textstream.h
seo.o: ../../../../winix/winixd/core/misc.h seo.o: ../../../../winix/winixd/core/misc.h
seo.o: ../../../../winix/winixd/core/item.h
seo.o: ../../../../winix/winixd/core/requesttypes.h seo.o: ../../../../winix/winixd/core/requesttypes.h
seo.o: ../../../../pikotools/textstream/textstream.h seo.o: ../../../../pikotools/textstream/textstream.h
seo.o: ../../../../pikotools/space/space.h
seo.o: ../../../../pikotools/textstream/types.h
seo.o: ../../../../pikotools/date/date.h
seo.o: ../../../../pikotools/convert/inttostr.h
seo.o: ../../../../pikotools/membuffer/membuffer.h seo.o: ../../../../pikotools/membuffer/membuffer.h
seo.o: ../../../../pikotools/textstream/types.h seo.o: ../../../../pikotools/textstream/types.h
seo.o: ../../../../pikotools/utf8/utf8.h seo.o: ../../../../pikotools/utf8/utf8.h
@ -211,6 +209,18 @@ seo.o: ../../../../winix/winixd/core/user.h
seo.o: ../../../../winix/winixd/core/group.h seo.o: ../../../../winix/winixd/core/group.h
seo.o: ../../../../winix/winixd/core/dircontainer.h seo.o: ../../../../winix/winixd/core/dircontainer.h
seo.o: ../../../../winix/winixd/core/winixbase.h seo.o: ../../../../winix/winixd/core/winixbase.h
seo.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.h
seo.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
seo.o: ../../../../morm/src/dbconnector.h ../../../../morm/src/queryresult.h
seo.o: ../../../../morm/src/flatconnector.h
seo.o: ../../../../morm/src/dbexpression.h
seo.o: ../../../../morm/src/baseexpression.h
seo.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
seo.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
seo.o: ../../../../morm/src/finderhelper.h
seo.o: ../../../../morm/src/fieldvaluehelper.h
seo.o: ../../../../morm/src/flatexpression.h
seo.o: ../../../../winix/winixd/models/itemcontent.h
seo.o: ../../../../winix/winixd/core/ugcontainer.h seo.o: ../../../../winix/winixd/core/ugcontainer.h
seo.o: ../../../../winix/winixd/core/request.h seo.o: ../../../../winix/winixd/core/request.h
seo.o: ../../../../winix/winixd/core/error.h seo.o: ../../../../winix/winixd/core/error.h
@ -226,17 +236,8 @@ seo.o: ../../../../winix/winixd/core/winixmodel.h
seo.o: ../../../../winix/winixd/core/plugin.h seo.o: ../../../../winix/winixd/core/plugin.h
seo.o: ../../../../winix/winixd/core/pluginmsg.h seo.o: ../../../../winix/winixd/core/pluginmsg.h
seo.o: ../../../../winix/winixd/core/plugindata.h ../../../../morm/src/morm.h seo.o: ../../../../winix/winixd/core/plugindata.h ../../../../morm/src/morm.h
seo.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h seo.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
seo.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h seo.o: ../../../../morm/src/jsonexpression.h
seo.o: ../../../../morm/src/dbconnector.h ../../../../morm/src/queryresult.h
seo.o: ../../../../morm/src/flatconnector.h
seo.o: ../../../../morm/src/dbexpression.h
seo.o: ../../../../morm/src/baseexpression.h ../../../../morm/src/modelenv.h
seo.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
seo.o: ../../../../morm/src/finderhelper.h
seo.o: ../../../../morm/src/fieldvaluehelper.h
seo.o: ../../../../morm/src/flatexpression.h ../../../../morm/src/finder.h
seo.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
seo.o: ../../../../morm/src/postgresqlexpression.h seo.o: ../../../../morm/src/postgresqlexpression.h
seo.o: ../../../../morm/src/jsonconnector.h seo.o: ../../../../morm/src/jsonconnector.h
seo.o: ../../../../morm/src/postgresqlconnector.h seo.o: ../../../../morm/src/postgresqlconnector.h
@ -270,10 +271,10 @@ seo.o: ../../../../winix/winixd/templates/patterns.h
seo.o: ../../../../winix/winixd/templates/locale.h seo.o: ../../../../winix/winixd/templates/locale.h
seo.o: ../../../../winix/winixd/templates/localefilter.h seo.o: ../../../../winix/winixd/templates/localefilter.h
seo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h seo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
seo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h seo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
seo.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h seo.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
seo.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h seo.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
seo.o: ../../../../ezc/src/expressionparser.h seo.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
seo.o: ../../../../ezc/src/patternparser.h seo.o: ../../../../ezc/src/patternparser.h
seo.o: ../../../../winix/winixd/notify/notifythread.h seo.o: ../../../../winix/winixd/notify/notifythread.h
seo.o: ../../../../winix/winixd/core/basethread.h seo.o: ../../../../winix/winixd/core/basethread.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2019, Tomasz Sowa * Copyright (c) 2019-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -77,12 +77,13 @@ void Seo::MakePost()
item.subject = subject; item.subject = subject;
PT::Space & seo = item.meta.FindAddSpace(L"seo"); PT::Space & seo = item.item_content.meta.FindAddSpace(L"seo");
seo.Add(L"description", description); seo.Add(L"description", description);
seo.Add(L"keywords", keywords); seo.Add(L"keywords", keywords);
db->EditSubjectById(item, item.id); item.update(false, true);
db->EditMetaById(item.meta, item.id); //db->EditSubjectById(item, item.id);
//db->EditMetaById(item.meta, item.id);
if( item.type == Item::file ) if( item.type == Item::file )
plugin->Call(WINIX_FILE_CHANGED, &item); plugin->Call(WINIX_FILE_CHANGED, &item);

View File

@ -14,7 +14,18 @@ init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/log/filelog.h init.o: ../../../../pikotools/log/filelog.h
init.o: ../../../../winix/winixd/core/request.h init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/requesttypes.h init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../winix/winixd/core/item.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/error.h init.o: ../../../../winix/winixd/core/error.h
init.o: ../../../../winix/winixd/core/config.h init.o: ../../../../winix/winixd/core/config.h
init.o: ../../../../pikotools/space/spaceparser.h init.o: ../../../../pikotools/space/spaceparser.h
@ -44,7 +55,6 @@ init.o: ../../../../winix/winixd/core/lock.h
init.o: ../../../../winix/winixd/core/synchro.h init.o: ../../../../winix/winixd/core/synchro.h
init.o: ../../../../winix/winixd/core/error.h init.o: ../../../../winix/winixd/core/error.h
init.o: ../../../../winix/winixd/db/dbitemquery.h init.o: ../../../../winix/winixd/db/dbitemquery.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/db/dbitemcolumns.h init.o: ../../../../winix/winixd/db/dbitemcolumns.h
init.o: ../../../../winix/winixd/core/user.h init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
@ -62,17 +72,8 @@ init.o: ../../../../winix/winixd/core/mount.h bot.h stats.h
init.o: ../../../../winix/winixd/core/winixmodel.h init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h init.o: ../../../../winix/winixd/core/plugin.h
init.o: ../../../../winix/winixd/core/pluginmsg.h ../../../../morm/src/morm.h init.o: ../../../../winix/winixd/core/pluginmsg.h ../../../../morm/src/morm.h
init.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h init.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
init.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h init.o: ../../../../morm/src/jsonexpression.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 ../../../../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/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h init.o: ../../../../morm/src/jsonconnector.h
init.o: ../../../../morm/src/postgresqlconnector.h init.o: ../../../../morm/src/postgresqlconnector.h
@ -101,11 +102,11 @@ stats.o: ../../../../winix/winixd/core/plugin.h
stats.o: ../../../../winix/winixd/core/pluginmsg.h stats.o: ../../../../winix/winixd/core/pluginmsg.h
stats.o: ../../../../winix/winixd/core/plugindata.h stats.o: ../../../../winix/winixd/core/plugindata.h
stats.o: ../../../../winix/winixd/core/winixbase.h stats.o: ../../../../winix/winixd/core/winixbase.h
stats.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h stats.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
stats.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h stats.o: ../../../../morm/src/dbconnector.h
stats.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
stats.o: ../../../../morm/src/queryresult.h stats.o: ../../../../morm/src/queryresult.h
stats.o: ../../../../morm/src/flatconnector.h stats.o: ../../../../morm/src/flatconnector.h ../../../../morm/src/morm.h
stats.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h
stats.o: ../../../../morm/src/dbexpression.h stats.o: ../../../../morm/src/dbexpression.h
stats.o: ../../../../morm/src/baseexpression.h stats.o: ../../../../morm/src/baseexpression.h
stats.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h stats.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
@ -121,15 +122,14 @@ stats.o: ../../../../morm/src/postgresqlconnector.h
stats.o: ../../../../morm/src/postgresqlqueryresult.h stats.o: ../../../../morm/src/postgresqlqueryresult.h
templates.o: templates.h ../../../../winix/winixd/core/plugin.h templates.o: templates.h ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
templates.o: ../../../../ezc/src/blocks.h templates.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../winix/winixd/core/item.h templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/space/space.h templates.o: ../../../../pikotools/space/space.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/date/date.h templates.o: ../../../../pikotools/date/date.h
templates.o: ../../../../pikotools/convert/inttostr.h templates.o: ../../../../pikotools/convert/inttostr.h
templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../pikotools/utf8/utf8.h
templates.o: ../../../../pikotools/textstream/textstream.h
templates.o: ../../../../pikotools/membuffer/membuffer.h templates.o: ../../../../pikotools/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
@ -160,13 +160,12 @@ templates.o: ../../../../winix/winixd/core/plugin.h
templates.o: ../../../../winix/winixd/core/pluginmsg.h templates.o: ../../../../winix/winixd/core/pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.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/modelconnector.h
templates.o: ../../../../morm/src/clearer.h templates.o: ../../../../morm/src/clearer.h
templates.o: ../../../../morm/src/dbconnector.h templates.o: ../../../../morm/src/dbconnector.h
templates.o: ../../../../morm/src/queryresult.h templates.o: ../../../../morm/src/queryresult.h
templates.o: ../../../../morm/src/flatconnector.h templates.o: ../../../../morm/src/flatconnector.h ../../../../morm/src/morm.h
templates.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h
templates.o: ../../../../morm/src/dbexpression.h templates.o: ../../../../morm/src/dbexpression.h
templates.o: ../../../../morm/src/baseexpression.h templates.o: ../../../../morm/src/baseexpression.h
templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h

View File

@ -2,20 +2,18 @@
createthread.o: createthread.h createthread.o: createthread.h
createthread.o: ../../../../winix/winixd/functions/functionbase.h createthread.o: ../../../../winix/winixd/functions/functionbase.h
createthread.o: ../../../../winix/winixd/core/item.h
createthread.o: ../../../../pikotools/space/space.h
createthread.o: ../../../../pikotools/textstream/types.h
createthread.o: ../../../../pikotools/date/date.h
createthread.o: ../../../../pikotools/convert/inttostr.h
createthread.o: ../../../../winix/winixd/db/db.h createthread.o: ../../../../winix/winixd/db/db.h
createthread.o: ../../../../winix/winixd/db/dbbase.h createthread.o: ../../../../winix/winixd/db/dbbase.h
createthread.o: ../../../../winix/winixd/db/dbconn.h createthread.o: ../../../../winix/winixd/db/dbconn.h
createthread.o: ../../../../winix/winixd/db/dbtextstream.h createthread.o: ../../../../winix/winixd/db/dbtextstream.h
createthread.o: ../../../../winix/winixd/core/textstream.h createthread.o: ../../../../winix/winixd/core/textstream.h
createthread.o: ../../../../winix/winixd/core/misc.h createthread.o: ../../../../winix/winixd/core/misc.h
createthread.o: ../../../../winix/winixd/core/item.h
createthread.o: ../../../../winix/winixd/core/requesttypes.h createthread.o: ../../../../winix/winixd/core/requesttypes.h
createthread.o: ../../../../pikotools/textstream/textstream.h createthread.o: ../../../../pikotools/textstream/textstream.h
createthread.o: ../../../../pikotools/space/space.h
createthread.o: ../../../../pikotools/textstream/types.h
createthread.o: ../../../../pikotools/date/date.h
createthread.o: ../../../../pikotools/convert/inttostr.h
createthread.o: ../../../../pikotools/membuffer/membuffer.h createthread.o: ../../../../pikotools/membuffer/membuffer.h
createthread.o: ../../../../pikotools/textstream/types.h createthread.o: ../../../../pikotools/textstream/types.h
createthread.o: ../../../../pikotools/utf8/utf8.h createthread.o: ../../../../pikotools/utf8/utf8.h
@ -45,6 +43,23 @@ createthread.o: ../../../../winix/winixd/core/user.h
createthread.o: ../../../../winix/winixd/core/group.h createthread.o: ../../../../winix/winixd/core/group.h
createthread.o: ../../../../winix/winixd/core/dircontainer.h createthread.o: ../../../../winix/winixd/core/dircontainer.h
createthread.o: ../../../../winix/winixd/core/winixbase.h createthread.o: ../../../../winix/winixd/core/winixbase.h
createthread.o: ../../../../winix/winixd/models/item.h
createthread.o: ../../../../morm/src/model.h
createthread.o: ../../../../morm/src/modelconnector.h
createthread.o: ../../../../morm/src/clearer.h
createthread.o: ../../../../morm/src/dbconnector.h
createthread.o: ../../../../morm/src/queryresult.h
createthread.o: ../../../../morm/src/flatconnector.h
createthread.o: ../../../../morm/src/dbexpression.h
createthread.o: ../../../../morm/src/baseexpression.h
createthread.o: ../../../../morm/src/morm_types.h
createthread.o: ../../../../morm/src/modelenv.h
createthread.o: ../../../../morm/src/modeldata.h
createthread.o: ../../../../morm/src/cursorhelper.h
createthread.o: ../../../../morm/src/finderhelper.h
createthread.o: ../../../../morm/src/fieldvaluehelper.h
createthread.o: ../../../../morm/src/flatexpression.h
createthread.o: ../../../../winix/winixd/models/itemcontent.h
createthread.o: ../../../../winix/winixd/core/ugcontainer.h createthread.o: ../../../../winix/winixd/core/ugcontainer.h
createthread.o: ../../../../winix/winixd/core/request.h createthread.o: ../../../../winix/winixd/core/request.h
createthread.o: ../../../../winix/winixd/core/error.h createthread.o: ../../../../winix/winixd/core/error.h
@ -59,22 +74,8 @@ createthread.o: ../../../../winix/winixd/core/basethread.h
createthread.o: ../../../../winix/winixd/core/winixmodel.h createthread.o: ../../../../winix/winixd/core/winixmodel.h
createthread.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h createthread.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
createthread.o: ../../../../winix/winixd/core/plugindata.h createthread.o: ../../../../winix/winixd/core/plugindata.h
createthread.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h createthread.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
createthread.o: ../../../../morm/src/model.h createthread.o: ../../../../morm/src/cursor.h
createthread.o: ../../../../morm/src/modelconnector.h
createthread.o: ../../../../morm/src/clearer.h
createthread.o: ../../../../morm/src/dbconnector.h
createthread.o: ../../../../morm/src/queryresult.h
createthread.o: ../../../../morm/src/flatconnector.h
createthread.o: ../../../../morm/src/dbexpression.h
createthread.o: ../../../../morm/src/baseexpression.h
createthread.o: ../../../../morm/src/modelenv.h
createthread.o: ../../../../morm/src/modeldata.h
createthread.o: ../../../../morm/src/cursorhelper.h
createthread.o: ../../../../morm/src/finderhelper.h
createthread.o: ../../../../morm/src/fieldvaluehelper.h
createthread.o: ../../../../morm/src/flatexpression.h
createthread.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
createthread.o: ../../../../morm/src/jsonexpression.h createthread.o: ../../../../morm/src/jsonexpression.h
createthread.o: ../../../../morm/src/postgresqlexpression.h createthread.o: ../../../../morm/src/postgresqlexpression.h
createthread.o: ../../../../morm/src/jsonconnector.h createthread.o: ../../../../morm/src/jsonconnector.h
@ -109,9 +110,10 @@ createthread.o: ../../../../winix/winixd/templates/patterns.h
createthread.o: ../../../../winix/winixd/templates/locale.h createthread.o: ../../../../winix/winixd/templates/locale.h
createthread.o: ../../../../winix/winixd/templates/localefilter.h createthread.o: ../../../../winix/winixd/templates/localefilter.h
createthread.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h createthread.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
createthread.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h createthread.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
createthread.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h createthread.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
createthread.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h createthread.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
createthread.o: ../../../../ezc/src/pattern.h
createthread.o: ../../../../ezc/src/expressionparser.h createthread.o: ../../../../ezc/src/expressionparser.h
createthread.o: ../../../../ezc/src/patternparser.h createthread.o: ../../../../ezc/src/patternparser.h
createthread.o: ../../../../winix/winixd/notify/notifythread.h createthread.o: ../../../../winix/winixd/notify/notifythread.h
@ -178,7 +180,6 @@ createthread.o: ../../../../winix/winixd/functions/who.h
createthread.o: ../../../../winix/winixd/functions/vim.h createthread.o: ../../../../winix/winixd/functions/vim.h
createthread.o: ../../../../winix/winixd/core/htmlfilter.h createthread.o: ../../../../winix/winixd/core/htmlfilter.h
funthread.o: ../../../../winix/winixd/core/misc.h funthread.o: ../../../../winix/winixd/core/misc.h
funthread.o: ../../../../winix/winixd/core/item.h
funthread.o: ../../../../winix/winixd/core/requesttypes.h funthread.o: ../../../../winix/winixd/core/requesttypes.h
funthread.o: ../../../../pikotools/textstream/textstream.h funthread.o: ../../../../pikotools/textstream/textstream.h
funthread.o: ../../../../pikotools/space/space.h funthread.o: ../../../../pikotools/space/space.h
@ -196,7 +197,6 @@ funthread.o: ../../../../pikotools/convert/strtoint.h
funthread.o: ../../../../pikotools/convert/text.h funthread.o: ../../../../pikotools/convert/text.h
funthread.o: ../../../../winix/winixd/core/misc.h funthread.h funthread.o: ../../../../winix/winixd/core/misc.h funthread.h
funthread.o: ../../../../winix/winixd/functions/functionbase.h funthread.o: ../../../../winix/winixd/functions/functionbase.h
funthread.o: ../../../../winix/winixd/core/item.h
funthread.o: ../../../../winix/winixd/db/db.h funthread.o: ../../../../winix/winixd/db/db.h
funthread.o: ../../../../winix/winixd/db/dbbase.h funthread.o: ../../../../winix/winixd/db/dbbase.h
funthread.o: ../../../../winix/winixd/db/dbconn.h funthread.o: ../../../../winix/winixd/db/dbconn.h
@ -222,6 +222,22 @@ funthread.o: ../../../../winix/winixd/core/user.h
funthread.o: ../../../../winix/winixd/core/group.h funthread.o: ../../../../winix/winixd/core/group.h
funthread.o: ../../../../winix/winixd/core/dircontainer.h funthread.o: ../../../../winix/winixd/core/dircontainer.h
funthread.o: ../../../../winix/winixd/core/winixbase.h funthread.o: ../../../../winix/winixd/core/winixbase.h
funthread.o: ../../../../winix/winixd/models/item.h
funthread.o: ../../../../morm/src/model.h
funthread.o: ../../../../morm/src/modelconnector.h
funthread.o: ../../../../morm/src/clearer.h
funthread.o: ../../../../morm/src/dbconnector.h
funthread.o: ../../../../morm/src/queryresult.h
funthread.o: ../../../../morm/src/flatconnector.h
funthread.o: ../../../../morm/src/dbexpression.h
funthread.o: ../../../../morm/src/baseexpression.h
funthread.o: ../../../../morm/src/morm_types.h
funthread.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
funthread.o: ../../../../morm/src/cursorhelper.h
funthread.o: ../../../../morm/src/finderhelper.h
funthread.o: ../../../../morm/src/fieldvaluehelper.h
funthread.o: ../../../../morm/src/flatexpression.h
funthread.o: ../../../../winix/winixd/models/itemcontent.h
funthread.o: ../../../../winix/winixd/core/ugcontainer.h funthread.o: ../../../../winix/winixd/core/ugcontainer.h
funthread.o: ../../../../winix/winixd/core/request.h funthread.o: ../../../../winix/winixd/core/request.h
funthread.o: ../../../../winix/winixd/core/error.h funthread.o: ../../../../winix/winixd/core/error.h
@ -236,21 +252,8 @@ funthread.o: ../../../../winix/winixd/core/basethread.h
funthread.o: ../../../../winix/winixd/core/winixmodel.h funthread.o: ../../../../winix/winixd/core/winixmodel.h
funthread.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h funthread.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
funthread.o: ../../../../winix/winixd/core/plugindata.h funthread.o: ../../../../winix/winixd/core/plugindata.h
funthread.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h funthread.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
funthread.o: ../../../../morm/src/model.h funthread.o: ../../../../morm/src/cursor.h
funthread.o: ../../../../morm/src/modelconnector.h
funthread.o: ../../../../morm/src/clearer.h
funthread.o: ../../../../morm/src/dbconnector.h
funthread.o: ../../../../morm/src/queryresult.h
funthread.o: ../../../../morm/src/flatconnector.h
funthread.o: ../../../../morm/src/dbexpression.h
funthread.o: ../../../../morm/src/baseexpression.h
funthread.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
funthread.o: ../../../../morm/src/cursorhelper.h
funthread.o: ../../../../morm/src/finderhelper.h
funthread.o: ../../../../morm/src/fieldvaluehelper.h
funthread.o: ../../../../morm/src/flatexpression.h
funthread.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
funthread.o: ../../../../morm/src/jsonexpression.h funthread.o: ../../../../morm/src/jsonexpression.h
funthread.o: ../../../../morm/src/postgresqlexpression.h funthread.o: ../../../../morm/src/postgresqlexpression.h
funthread.o: ../../../../morm/src/jsonconnector.h funthread.o: ../../../../morm/src/jsonconnector.h
@ -285,9 +288,10 @@ funthread.o: ../../../../winix/winixd/templates/patterns.h
funthread.o: ../../../../winix/winixd/templates/locale.h funthread.o: ../../../../winix/winixd/templates/locale.h
funthread.o: ../../../../winix/winixd/templates/localefilter.h funthread.o: ../../../../winix/winixd/templates/localefilter.h
funthread.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h funthread.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
funthread.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h funthread.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
funthread.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h funthread.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
funthread.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h funthread.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
funthread.o: ../../../../ezc/src/pattern.h
funthread.o: ../../../../ezc/src/expressionparser.h funthread.o: ../../../../ezc/src/expressionparser.h
funthread.o: ../../../../ezc/src/patternparser.h funthread.o: ../../../../ezc/src/patternparser.h
funthread.o: ../../../../winix/winixd/notify/notifythread.h funthread.o: ../../../../winix/winixd/notify/notifythread.h
@ -313,17 +317,15 @@ init.o: ../../../../pikotools/convert/inttostr.h
init.o: ../../../../winix/winixd/db/dbbase.h init.o: ../../../../winix/winixd/db/dbbase.h
init.o: ../../../../winix/winixd/core/error.h reply.h init.o: ../../../../winix/winixd/core/error.h reply.h
init.o: ../../../../winix/winixd/functions/functionbase.h init.o: ../../../../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: ../../../../winix/winixd/db/db.h ../../../../winix/winixd/db/dbbase.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/dbconn.h
init.o: ../../../../winix/winixd/db/dbtextstream.h init.o: ../../../../winix/winixd/db/dbtextstream.h
init.o: ../../../../winix/winixd/core/textstream.h init.o: ../../../../winix/winixd/core/textstream.h
init.o: ../../../../winix/winixd/core/misc.h init.o: ../../../../winix/winixd/core/misc.h
init.o: ../../../../winix/winixd/core/item.h
init.o: ../../../../winix/winixd/core/requesttypes.h init.o: ../../../../winix/winixd/core/requesttypes.h
init.o: ../../../../pikotools/textstream/textstream.h init.o: ../../../../pikotools/textstream/textstream.h
init.o: ../../../../pikotools/space/space.h
init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/membuffer/membuffer.h init.o: ../../../../pikotools/membuffer/membuffer.h
init.o: ../../../../pikotools/textstream/types.h init.o: ../../../../pikotools/textstream/types.h
init.o: ../../../../pikotools/utf8/utf8.h init.o: ../../../../pikotools/utf8/utf8.h
@ -351,6 +353,18 @@ init.o: ../../../../winix/winixd/core/user.h
init.o: ../../../../winix/winixd/core/group.h init.o: ../../../../winix/winixd/core/group.h
init.o: ../../../../winix/winixd/core/dircontainer.h init.o: ../../../../winix/winixd/core/dircontainer.h
init.o: ../../../../winix/winixd/core/winixbase.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/ugcontainer.h
init.o: ../../../../winix/winixd/core/request.h init.o: ../../../../winix/winixd/core/request.h
init.o: ../../../../winix/winixd/core/error.h init.o: ../../../../winix/winixd/core/error.h
@ -365,17 +379,7 @@ init.o: ../../../../winix/winixd/core/basethread.h
init.o: ../../../../winix/winixd/core/winixmodel.h init.o: ../../../../winix/winixd/core/winixmodel.h
init.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h init.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
init.o: ../../../../winix/winixd/core/plugindata.h init.o: ../../../../winix/winixd/core/plugindata.h
init.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h init.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.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/cursor.h ../../../../morm/src/jsonexpression.h init.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
init.o: ../../../../morm/src/postgresqlexpression.h init.o: ../../../../morm/src/postgresqlexpression.h
init.o: ../../../../morm/src/jsonconnector.h init.o: ../../../../morm/src/jsonconnector.h
@ -410,10 +414,10 @@ init.o: ../../../../winix/winixd/templates/patterns.h
init.o: ../../../../winix/winixd/templates/locale.h init.o: ../../../../winix/winixd/templates/locale.h
init.o: ../../../../winix/winixd/templates/localefilter.h init.o: ../../../../winix/winixd/templates/localefilter.h
init.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
init.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h init.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
init.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h init.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
init.o: ../../../../ezc/src/expressionparser.h init.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
init.o: ../../../../ezc/src/patternparser.h init.o: ../../../../ezc/src/patternparser.h
init.o: ../../../../winix/winixd/notify/notifythread.h init.o: ../../../../winix/winixd/notify/notifythread.h
init.o: ../../../../winix/winixd/core/basethread.h init.o: ../../../../winix/winixd/core/basethread.h
@ -480,20 +484,18 @@ init.o: ../../../../winix/winixd/functions/who.h
init.o: ../../../../winix/winixd/functions/vim.h init.o: ../../../../winix/winixd/functions/vim.h
init.o: ../../../../winix/winixd/core/htmlfilter.h init.o: ../../../../winix/winixd/core/htmlfilter.h
reply.o: reply.h ../../../../winix/winixd/functions/functionbase.h reply.o: reply.h ../../../../winix/winixd/functions/functionbase.h
reply.o: ../../../../winix/winixd/core/item.h
reply.o: ../../../../pikotools/space/space.h
reply.o: ../../../../pikotools/textstream/types.h
reply.o: ../../../../pikotools/date/date.h
reply.o: ../../../../pikotools/convert/inttostr.h
reply.o: ../../../../winix/winixd/db/db.h reply.o: ../../../../winix/winixd/db/db.h
reply.o: ../../../../winix/winixd/db/dbbase.h reply.o: ../../../../winix/winixd/db/dbbase.h
reply.o: ../../../../winix/winixd/db/dbconn.h reply.o: ../../../../winix/winixd/db/dbconn.h
reply.o: ../../../../winix/winixd/db/dbtextstream.h reply.o: ../../../../winix/winixd/db/dbtextstream.h
reply.o: ../../../../winix/winixd/core/textstream.h reply.o: ../../../../winix/winixd/core/textstream.h
reply.o: ../../../../winix/winixd/core/misc.h reply.o: ../../../../winix/winixd/core/misc.h
reply.o: ../../../../winix/winixd/core/item.h
reply.o: ../../../../winix/winixd/core/requesttypes.h reply.o: ../../../../winix/winixd/core/requesttypes.h
reply.o: ../../../../pikotools/textstream/textstream.h reply.o: ../../../../pikotools/textstream/textstream.h
reply.o: ../../../../pikotools/space/space.h
reply.o: ../../../../pikotools/textstream/types.h
reply.o: ../../../../pikotools/date/date.h
reply.o: ../../../../pikotools/convert/inttostr.h
reply.o: ../../../../pikotools/membuffer/membuffer.h reply.o: ../../../../pikotools/membuffer/membuffer.h
reply.o: ../../../../pikotools/textstream/types.h reply.o: ../../../../pikotools/textstream/types.h
reply.o: ../../../../pikotools/utf8/utf8.h reply.o: ../../../../pikotools/utf8/utf8.h
@ -522,6 +524,19 @@ reply.o: ../../../../winix/winixd/core/user.h
reply.o: ../../../../winix/winixd/core/group.h reply.o: ../../../../winix/winixd/core/group.h
reply.o: ../../../../winix/winixd/core/dircontainer.h reply.o: ../../../../winix/winixd/core/dircontainer.h
reply.o: ../../../../winix/winixd/core/winixbase.h reply.o: ../../../../winix/winixd/core/winixbase.h
reply.o: ../../../../winix/winixd/models/item.h ../../../../morm/src/model.h
reply.o: ../../../../morm/src/modelconnector.h ../../../../morm/src/clearer.h
reply.o: ../../../../morm/src/dbconnector.h
reply.o: ../../../../morm/src/queryresult.h
reply.o: ../../../../morm/src/flatconnector.h
reply.o: ../../../../morm/src/dbexpression.h
reply.o: ../../../../morm/src/baseexpression.h
reply.o: ../../../../morm/src/morm_types.h ../../../../morm/src/modelenv.h
reply.o: ../../../../morm/src/modeldata.h ../../../../morm/src/cursorhelper.h
reply.o: ../../../../morm/src/finderhelper.h
reply.o: ../../../../morm/src/fieldvaluehelper.h
reply.o: ../../../../morm/src/flatexpression.h
reply.o: ../../../../winix/winixd/models/itemcontent.h
reply.o: ../../../../winix/winixd/core/ugcontainer.h reply.o: ../../../../winix/winixd/core/ugcontainer.h
reply.o: ../../../../winix/winixd/core/request.h reply.o: ../../../../winix/winixd/core/request.h
reply.o: ../../../../winix/winixd/core/error.h reply.o: ../../../../winix/winixd/core/error.h
@ -536,18 +551,7 @@ reply.o: ../../../../winix/winixd/core/basethread.h
reply.o: ../../../../winix/winixd/core/winixmodel.h reply.o: ../../../../winix/winixd/core/winixmodel.h
reply.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h reply.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
reply.o: ../../../../winix/winixd/core/plugindata.h reply.o: ../../../../winix/winixd/core/plugindata.h
reply.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h reply.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
reply.o: ../../../../morm/src/model.h ../../../../morm/src/modelconnector.h
reply.o: ../../../../morm/src/clearer.h ../../../../morm/src/dbconnector.h
reply.o: ../../../../morm/src/queryresult.h
reply.o: ../../../../morm/src/flatconnector.h
reply.o: ../../../../morm/src/dbexpression.h
reply.o: ../../../../morm/src/baseexpression.h
reply.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
reply.o: ../../../../morm/src/cursorhelper.h
reply.o: ../../../../morm/src/finderhelper.h
reply.o: ../../../../morm/src/fieldvaluehelper.h
reply.o: ../../../../morm/src/flatexpression.h ../../../../morm/src/finder.h
reply.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h reply.o: ../../../../morm/src/cursor.h ../../../../morm/src/jsonexpression.h
reply.o: ../../../../morm/src/postgresqlexpression.h reply.o: ../../../../morm/src/postgresqlexpression.h
reply.o: ../../../../morm/src/jsonconnector.h reply.o: ../../../../morm/src/jsonconnector.h
@ -582,10 +586,10 @@ reply.o: ../../../../winix/winixd/templates/patterns.h
reply.o: ../../../../winix/winixd/templates/locale.h reply.o: ../../../../winix/winixd/templates/locale.h
reply.o: ../../../../winix/winixd/templates/localefilter.h reply.o: ../../../../winix/winixd/templates/localefilter.h
reply.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h reply.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
reply.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h reply.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
reply.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h reply.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
reply.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h reply.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
reply.o: ../../../../ezc/src/expressionparser.h reply.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/expressionparser.h
reply.o: ../../../../ezc/src/patternparser.h reply.o: ../../../../ezc/src/patternparser.h
reply.o: ../../../../winix/winixd/notify/notifythread.h reply.o: ../../../../winix/winixd/notify/notifythread.h
reply.o: ../../../../winix/winixd/core/basethread.h reply.o: ../../../../winix/winixd/core/basethread.h
@ -653,20 +657,18 @@ reply.o: ../../../../winix/winixd/core/htmlfilter.h
reply.o: ../../../../winix/winixd/core/misc.h reply.o: ../../../../winix/winixd/core/misc.h
showthreads.o: showthreads.h showthreads.o: showthreads.h
showthreads.o: ../../../../winix/winixd/functions/functionbase.h showthreads.o: ../../../../winix/winixd/functions/functionbase.h
showthreads.o: ../../../../winix/winixd/core/item.h
showthreads.o: ../../../../pikotools/space/space.h
showthreads.o: ../../../../pikotools/textstream/types.h
showthreads.o: ../../../../pikotools/date/date.h
showthreads.o: ../../../../pikotools/convert/inttostr.h
showthreads.o: ../../../../winix/winixd/db/db.h showthreads.o: ../../../../winix/winixd/db/db.h
showthreads.o: ../../../../winix/winixd/db/dbbase.h showthreads.o: ../../../../winix/winixd/db/dbbase.h
showthreads.o: ../../../../winix/winixd/db/dbconn.h showthreads.o: ../../../../winix/winixd/db/dbconn.h
showthreads.o: ../../../../winix/winixd/db/dbtextstream.h showthreads.o: ../../../../winix/winixd/db/dbtextstream.h
showthreads.o: ../../../../winix/winixd/core/textstream.h showthreads.o: ../../../../winix/winixd/core/textstream.h
showthreads.o: ../../../../winix/winixd/core/misc.h showthreads.o: ../../../../winix/winixd/core/misc.h
showthreads.o: ../../../../winix/winixd/core/item.h
showthreads.o: ../../../../winix/winixd/core/requesttypes.h showthreads.o: ../../../../winix/winixd/core/requesttypes.h
showthreads.o: ../../../../pikotools/textstream/textstream.h showthreads.o: ../../../../pikotools/textstream/textstream.h
showthreads.o: ../../../../pikotools/space/space.h
showthreads.o: ../../../../pikotools/textstream/types.h
showthreads.o: ../../../../pikotools/date/date.h
showthreads.o: ../../../../pikotools/convert/inttostr.h
showthreads.o: ../../../../pikotools/membuffer/membuffer.h showthreads.o: ../../../../pikotools/membuffer/membuffer.h
showthreads.o: ../../../../pikotools/textstream/types.h showthreads.o: ../../../../pikotools/textstream/types.h
showthreads.o: ../../../../pikotools/utf8/utf8.h showthreads.o: ../../../../pikotools/utf8/utf8.h
@ -696,6 +698,23 @@ showthreads.o: ../../../../winix/winixd/core/user.h
showthreads.o: ../../../../winix/winixd/core/group.h showthreads.o: ../../../../winix/winixd/core/group.h
showthreads.o: ../../../../winix/winixd/core/dircontainer.h showthreads.o: ../../../../winix/winixd/core/dircontainer.h
showthreads.o: ../../../../winix/winixd/core/winixbase.h showthreads.o: ../../../../winix/winixd/core/winixbase.h
showthreads.o: ../../../../winix/winixd/models/item.h
showthreads.o: ../../../../morm/src/model.h
showthreads.o: ../../../../morm/src/modelconnector.h
showthreads.o: ../../../../morm/src/clearer.h
showthreads.o: ../../../../morm/src/dbconnector.h
showthreads.o: ../../../../morm/src/queryresult.h
showthreads.o: ../../../../morm/src/flatconnector.h
showthreads.o: ../../../../morm/src/dbexpression.h
showthreads.o: ../../../../morm/src/baseexpression.h
showthreads.o: ../../../../morm/src/morm_types.h
showthreads.o: ../../../../morm/src/modelenv.h
showthreads.o: ../../../../morm/src/modeldata.h
showthreads.o: ../../../../morm/src/cursorhelper.h
showthreads.o: ../../../../morm/src/finderhelper.h
showthreads.o: ../../../../morm/src/fieldvaluehelper.h
showthreads.o: ../../../../morm/src/flatexpression.h
showthreads.o: ../../../../winix/winixd/models/itemcontent.h
showthreads.o: ../../../../winix/winixd/core/ugcontainer.h showthreads.o: ../../../../winix/winixd/core/ugcontainer.h
showthreads.o: ../../../../winix/winixd/core/request.h showthreads.o: ../../../../winix/winixd/core/request.h
showthreads.o: ../../../../winix/winixd/core/error.h showthreads.o: ../../../../winix/winixd/core/error.h
@ -710,22 +729,8 @@ showthreads.o: ../../../../winix/winixd/core/basethread.h
showthreads.o: ../../../../winix/winixd/core/winixmodel.h showthreads.o: ../../../../winix/winixd/core/winixmodel.h
showthreads.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h showthreads.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
showthreads.o: ../../../../winix/winixd/core/plugindata.h showthreads.o: ../../../../winix/winixd/core/plugindata.h
showthreads.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h showthreads.o: ../../../../morm/src/morm.h ../../../../morm/src/finder.h
showthreads.o: ../../../../morm/src/model.h showthreads.o: ../../../../morm/src/cursor.h
showthreads.o: ../../../../morm/src/modelconnector.h
showthreads.o: ../../../../morm/src/clearer.h
showthreads.o: ../../../../morm/src/dbconnector.h
showthreads.o: ../../../../morm/src/queryresult.h
showthreads.o: ../../../../morm/src/flatconnector.h
showthreads.o: ../../../../morm/src/dbexpression.h
showthreads.o: ../../../../morm/src/baseexpression.h
showthreads.o: ../../../../morm/src/modelenv.h
showthreads.o: ../../../../morm/src/modeldata.h
showthreads.o: ../../../../morm/src/cursorhelper.h
showthreads.o: ../../../../morm/src/finderhelper.h
showthreads.o: ../../../../morm/src/fieldvaluehelper.h
showthreads.o: ../../../../morm/src/flatexpression.h
showthreads.o: ../../../../morm/src/finder.h ../../../../morm/src/cursor.h
showthreads.o: ../../../../morm/src/jsonexpression.h showthreads.o: ../../../../morm/src/jsonexpression.h
showthreads.o: ../../../../morm/src/postgresqlexpression.h showthreads.o: ../../../../morm/src/postgresqlexpression.h
showthreads.o: ../../../../morm/src/jsonconnector.h showthreads.o: ../../../../morm/src/jsonconnector.h
@ -760,9 +765,10 @@ showthreads.o: ../../../../winix/winixd/templates/patterns.h
showthreads.o: ../../../../winix/winixd/templates/locale.h showthreads.o: ../../../../winix/winixd/templates/locale.h
showthreads.o: ../../../../winix/winixd/templates/localefilter.h showthreads.o: ../../../../winix/winixd/templates/localefilter.h
showthreads.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h showthreads.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
showthreads.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h showthreads.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
showthreads.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h showthreads.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
showthreads.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h showthreads.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
showthreads.o: ../../../../ezc/src/pattern.h
showthreads.o: ../../../../ezc/src/expressionparser.h showthreads.o: ../../../../ezc/src/expressionparser.h
showthreads.o: ../../../../ezc/src/patternparser.h showthreads.o: ../../../../ezc/src/patternparser.h
showthreads.o: ../../../../winix/winixd/notify/notifythread.h showthreads.o: ../../../../winix/winixd/notify/notifythread.h
@ -788,12 +794,7 @@ tdb.o: ../../../../pikotools/convert/inttostr.h
tdb.o: ../../../../winix/winixd/db/dbbase.h tdb.o: ../../../../winix/winixd/db/dbbase.h
tdb.o: ../../../../winix/winixd/core/error.h tdb.o: ../../../../winix/winixd/core/error.h
tdb.o: ../../../../winix/winixd/core/log.h tdb.o: ../../../../winix/winixd/core/log.h
templates.o: threadinfo.h ../../../../winix/winixd/core/item.h templates.o: threadinfo.h ../../../../winix/winixd/core/system.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/core/system.h
templates.o: ../../../../winix/winixd/core/job.h templates.o: ../../../../winix/winixd/core/job.h
templates.o: ../../../../winix/winixd/core/basethread.h templates.o: ../../../../winix/winixd/core/basethread.h
templates.o: ../../../../winix/winixd/core/synchro.h templates.o: ../../../../winix/winixd/core/synchro.h
@ -806,6 +807,10 @@ templates.o: ../../../../winix/winixd/core/log.h
templates.o: ../../../../winix/winixd/core/logmanipulators.h templates.o: ../../../../winix/winixd/core/logmanipulators.h
templates.o: ../../../../pikotools/log/log.h templates.o: ../../../../pikotools/log/log.h
templates.o: ../../../../pikotools/textstream/textstream.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/membuffer/membuffer.h
templates.o: ../../../../pikotools/textstream/types.h templates.o: ../../../../pikotools/textstream/types.h
templates.o: ../../../../pikotools/log/filelog.h templates.o: ../../../../pikotools/log/filelog.h
@ -816,13 +821,12 @@ templates.o: ../../../../winix/winixd/core/lock.h
templates.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h templates.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
templates.o: ../../../../winix/winixd/core/plugindata.h templates.o: ../../../../winix/winixd/core/plugindata.h
templates.o: ../../../../winix/winixd/core/winixbase.h templates.o: ../../../../winix/winixd/core/winixbase.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/modelconnector.h
templates.o: ../../../../morm/src/clearer.h templates.o: ../../../../morm/src/clearer.h
templates.o: ../../../../morm/src/dbconnector.h templates.o: ../../../../morm/src/dbconnector.h
templates.o: ../../../../morm/src/queryresult.h templates.o: ../../../../morm/src/queryresult.h
templates.o: ../../../../morm/src/flatconnector.h templates.o: ../../../../morm/src/flatconnector.h ../../../../morm/src/morm.h
templates.o: ../../../../morm/src/morm_types.h ../../../../morm/src/model.h
templates.o: ../../../../morm/src/dbexpression.h templates.o: ../../../../morm/src/dbexpression.h
templates.o: ../../../../morm/src/baseexpression.h templates.o: ../../../../morm/src/baseexpression.h
templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h templates.o: ../../../../morm/src/modelenv.h ../../../../morm/src/modeldata.h
@ -838,7 +842,6 @@ templates.o: ../../../../morm/src/jsonconnector.h
templates.o: ../../../../morm/src/postgresqlconnector.h templates.o: ../../../../morm/src/postgresqlconnector.h
templates.o: ../../../../morm/src/postgresqlqueryresult.h templates.o: ../../../../morm/src/postgresqlqueryresult.h
templates.o: ../../../../winix/winixd/core/dirs.h templates.o: ../../../../winix/winixd/core/dirs.h
templates.o: ../../../../winix/winixd/core/item.h
templates.o: ../../../../winix/winixd/core/dircontainer.h templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/db/db.h templates.o: ../../../../winix/winixd/db/db.h
templates.o: ../../../../winix/winixd/db/dbbase.h templates.o: ../../../../winix/winixd/db/dbbase.h
@ -859,6 +862,8 @@ templates.o: ../../../../winix/winixd/db/dbitemcolumns.h
templates.o: ../../../../winix/winixd/core/user.h templates.o: ../../../../winix/winixd/core/user.h
templates.o: ../../../../winix/winixd/core/group.h templates.o: ../../../../winix/winixd/core/group.h
templates.o: ../../../../winix/winixd/core/dircontainer.h templates.o: ../../../../winix/winixd/core/dircontainer.h
templates.o: ../../../../winix/winixd/models/item.h
templates.o: ../../../../winix/winixd/models/itemcontent.h
templates.o: ../../../../winix/winixd/core/ugcontainer.h templates.o: ../../../../winix/winixd/core/ugcontainer.h
templates.o: ../../../../winix/winixd/core/request.h templates.o: ../../../../winix/winixd/core/request.h
templates.o: ../../../../winix/winixd/core/mounts.h templates.o: ../../../../winix/winixd/core/mounts.h
@ -890,10 +895,10 @@ templates.o: ../../../../winix/winixd/templates/patterns.h
templates.o: ../../../../winix/winixd/templates/locale.h templates.o: ../../../../winix/winixd/templates/locale.h
templates.o: ../../../../winix/winixd/templates/localefilter.h templates.o: ../../../../winix/winixd/templates/localefilter.h
templates.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.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/blocks.h ../../../../ezc/src/item.h
templates.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h templates.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
templates.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h templates.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
templates.o: ../../../../ezc/src/outstreams.h templates.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/outstreams.h
templates.o: ../../../../ezc/src/expressionparser.h templates.o: ../../../../ezc/src/expressionparser.h
templates.o: ../../../../ezc/src/patternparser.h templates.o: ../../../../ezc/src/patternparser.h
templates.o: ../../../../winix/winixd/notify/notifythread.h templates.o: ../../../../winix/winixd/notify/notifythread.h
@ -971,12 +976,7 @@ templates.o: ../../../../winix/winixd/functions/upload.h
templates.o: ../../../../winix/winixd/functions/uptime.h templates.o: ../../../../winix/winixd/functions/uptime.h
templates.o: ../../../../winix/winixd/functions/who.h templates.o: ../../../../winix/winixd/functions/who.h
templates.o: ../../../../winix/winixd/functions/vim.h templates.o: ../../../../winix/winixd/functions/vim.h
threadinfo.o: threadinfo.h ../../../../winix/winixd/core/item.h threadinfo.o: threadinfo.h ../../../../winix/winixd/core/system.h
threadinfo.o: ../../../../pikotools/space/space.h
threadinfo.o: ../../../../pikotools/textstream/types.h
threadinfo.o: ../../../../pikotools/date/date.h
threadinfo.o: ../../../../pikotools/convert/inttostr.h
threadinfo.o: ../../../../winix/winixd/core/system.h
threadinfo.o: ../../../../winix/winixd/core/job.h threadinfo.o: ../../../../winix/winixd/core/job.h
threadinfo.o: ../../../../winix/winixd/core/basethread.h threadinfo.o: ../../../../winix/winixd/core/basethread.h
threadinfo.o: ../../../../winix/winixd/core/synchro.h threadinfo.o: ../../../../winix/winixd/core/synchro.h
@ -989,6 +989,10 @@ threadinfo.o: ../../../../winix/winixd/core/log.h
threadinfo.o: ../../../../winix/winixd/core/logmanipulators.h threadinfo.o: ../../../../winix/winixd/core/logmanipulators.h
threadinfo.o: ../../../../pikotools/log/log.h threadinfo.o: ../../../../pikotools/log/log.h
threadinfo.o: ../../../../pikotools/textstream/textstream.h threadinfo.o: ../../../../pikotools/textstream/textstream.h
threadinfo.o: ../../../../pikotools/space/space.h
threadinfo.o: ../../../../pikotools/textstream/types.h
threadinfo.o: ../../../../pikotools/date/date.h
threadinfo.o: ../../../../pikotools/convert/inttostr.h
threadinfo.o: ../../../../pikotools/membuffer/membuffer.h threadinfo.o: ../../../../pikotools/membuffer/membuffer.h
threadinfo.o: ../../../../pikotools/textstream/types.h threadinfo.o: ../../../../pikotools/textstream/types.h
threadinfo.o: ../../../../pikotools/log/filelog.h threadinfo.o: ../../../../pikotools/log/filelog.h
@ -999,13 +1003,13 @@ threadinfo.o: ../../../../winix/winixd/core/lock.h
threadinfo.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h threadinfo.o: ../../../../winix/winixd/core/plugin.h pluginmsg.h
threadinfo.o: ../../../../winix/winixd/core/plugindata.h threadinfo.o: ../../../../winix/winixd/core/plugindata.h
threadinfo.o: ../../../../winix/winixd/core/winixbase.h threadinfo.o: ../../../../winix/winixd/core/winixbase.h
threadinfo.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
threadinfo.o: ../../../../morm/src/model.h
threadinfo.o: ../../../../morm/src/modelconnector.h threadinfo.o: ../../../../morm/src/modelconnector.h
threadinfo.o: ../../../../morm/src/clearer.h threadinfo.o: ../../../../morm/src/clearer.h
threadinfo.o: ../../../../morm/src/dbconnector.h threadinfo.o: ../../../../morm/src/dbconnector.h
threadinfo.o: ../../../../morm/src/queryresult.h threadinfo.o: ../../../../morm/src/queryresult.h
threadinfo.o: ../../../../morm/src/flatconnector.h threadinfo.o: ../../../../morm/src/flatconnector.h
threadinfo.o: ../../../../morm/src/morm.h ../../../../morm/src/morm_types.h
threadinfo.o: ../../../../morm/src/model.h
threadinfo.o: ../../../../morm/src/dbexpression.h threadinfo.o: ../../../../morm/src/dbexpression.h
threadinfo.o: ../../../../morm/src/baseexpression.h threadinfo.o: ../../../../morm/src/baseexpression.h
threadinfo.o: ../../../../morm/src/modelenv.h threadinfo.o: ../../../../morm/src/modelenv.h
@ -1022,7 +1026,6 @@ threadinfo.o: ../../../../morm/src/jsonconnector.h
threadinfo.o: ../../../../morm/src/postgresqlconnector.h threadinfo.o: ../../../../morm/src/postgresqlconnector.h
threadinfo.o: ../../../../morm/src/postgresqlqueryresult.h threadinfo.o: ../../../../morm/src/postgresqlqueryresult.h
threadinfo.o: ../../../../winix/winixd/core/dirs.h threadinfo.o: ../../../../winix/winixd/core/dirs.h
threadinfo.o: ../../../../winix/winixd/core/item.h
threadinfo.o: ../../../../winix/winixd/core/dircontainer.h threadinfo.o: ../../../../winix/winixd/core/dircontainer.h
threadinfo.o: ../../../../winix/winixd/db/db.h threadinfo.o: ../../../../winix/winixd/db/db.h
threadinfo.o: ../../../../winix/winixd/db/dbbase.h threadinfo.o: ../../../../winix/winixd/db/dbbase.h
@ -1043,6 +1046,8 @@ threadinfo.o: ../../../../winix/winixd/db/dbitemcolumns.h
threadinfo.o: ../../../../winix/winixd/core/user.h threadinfo.o: ../../../../winix/winixd/core/user.h
threadinfo.o: ../../../../winix/winixd/core/group.h threadinfo.o: ../../../../winix/winixd/core/group.h
threadinfo.o: ../../../../winix/winixd/core/dircontainer.h threadinfo.o: ../../../../winix/winixd/core/dircontainer.h
threadinfo.o: ../../../../winix/winixd/models/item.h
threadinfo.o: ../../../../winix/winixd/models/itemcontent.h
threadinfo.o: ../../../../winix/winixd/core/ugcontainer.h threadinfo.o: ../../../../winix/winixd/core/ugcontainer.h
threadinfo.o: ../../../../winix/winixd/core/request.h threadinfo.o: ../../../../winix/winixd/core/request.h
threadinfo.o: ../../../../winix/winixd/core/mounts.h threadinfo.o: ../../../../winix/winixd/core/mounts.h
@ -1074,10 +1079,10 @@ threadinfo.o: ../../../../winix/winixd/templates/patterns.h
threadinfo.o: ../../../../winix/winixd/templates/locale.h threadinfo.o: ../../../../winix/winixd/templates/locale.h
threadinfo.o: ../../../../winix/winixd/templates/localefilter.h threadinfo.o: ../../../../winix/winixd/templates/localefilter.h
threadinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h threadinfo.o: ../../../../ezc/src/ezc.h ../../../../ezc/src/generator.h
threadinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/cache.h threadinfo.o: ../../../../ezc/src/blocks.h ../../../../ezc/src/item.h
threadinfo.o: ../../../../ezc/src/functions.h ../../../../ezc/src/funinfo.h threadinfo.o: ../../../../ezc/src/cache.h ../../../../ezc/src/functions.h
threadinfo.o: ../../../../ezc/src/objects.h ../../../../ezc/src/pattern.h threadinfo.o: ../../../../ezc/src/funinfo.h ../../../../ezc/src/objects.h
threadinfo.o: ../../../../ezc/src/outstreams.h threadinfo.o: ../../../../ezc/src/pattern.h ../../../../ezc/src/outstreams.h
threadinfo.o: ../../../../ezc/src/expressionparser.h threadinfo.o: ../../../../ezc/src/expressionparser.h
threadinfo.o: ../../../../ezc/src/patternparser.h threadinfo.o: ../../../../ezc/src/patternparser.h
threadinfo.o: ../../../../winix/winixd/notify/notifythread.h threadinfo.o: ../../../../winix/winixd/notify/notifythread.h

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -100,7 +100,7 @@ void CreateThread::MakePost()
functions->SetUser(cur->request->item); functions->SetUser(cur->request->item);
functions->PrepareUrl(cur->request->item); functions->PrepareUrl(cur->request->item);
cur->request->item.parent_id = cur->request->dir_tab.back()->id; cur->request->item.parent_id = cur->request->dir_tab.back()->id;
cur->request->item.privileges = system->NewFilePrivileges(); cur->request->item.item_content.privileges = system->NewFilePrivileges();
if( functions->CheckAbuse() ) if( functions->CheckAbuse() )
return; return;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -83,16 +83,31 @@ void FunThread::PrepareThread(long file_id)
if( !id_tab.empty() ) if( !id_tab.empty() )
{ {
DbItemQuery iq; // DbItemQuery iq;
//
// if( system->mounts.pmount->IsArg(thread_info->mount_par_thread, L"sort_desc") )
// iq.sort_date_asc = false; // sort_index_asc we are ignoring
//
// iq.WhereIdIn(id_tab);
// iq.WhereType(Item::file);
// iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
morm::Finder<Item> finder(model_connector);
thread_info->item_tab = finder.
select().
where().
in(L"id", id_tab).
eq(L"type", static_cast<int>(Item::file)).
eq(L"content.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") )
iq.sort_date_asc = false; // sort_index_asc we are ignoring finder.raw("order by content.date_creation desc");
else
finder.raw("order by content.date_creation asc");
iq.WhereIdIn(id_tab); //db->GetItems(thread_info->item_tab, iq);
iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(thread_info->item_tab, iq);
system->CheckAccessToItems(thread_info->item_tab); system->CheckAccessToItems(thread_info->item_tab);
thread_info->item_sort_tab.resize(thread_info->item_tab.size()); thread_info->item_sort_tab.resize(thread_info->item_tab.size());

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -80,7 +80,7 @@ bool Reply::HasAccess()
return false; return false;
PT::Space * thread_space = cur->request->item.ameta.FindSpace(L"thread"); PT::Space * thread_space = cur->request->item.item_content.meta_admin.FindSpace(L"thread");
if( thread_space ) if( thread_space )
{ {
@ -128,7 +128,7 @@ void Reply::MakePost()
functions->SetUser(answer); functions->SetUser(answer);
functions->PrepareUrl(answer); functions->PrepareUrl(answer);
answer.parent_id = files_dir->id; answer.parent_id = files_dir->id;
answer.privileges = system->NewFilePrivileges(); answer.item_content.privileges = system->NewFilePrivileges();
if( functions->CheckAbuse() ) if( functions->CheckAbuse() )
return; return;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2014, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -89,7 +89,7 @@ bool ShowThreads::Sort::operator()(const Item * item1, const Item * item2)
else else
{ {
// sorting by date // sorting by date
return item1->date_creation > item2->date_creation; return item1->item_content.date_creation > item2->item_content.date_creation;
} }
} }
@ -99,21 +99,31 @@ bool ShowThreads::Sort::operator()(const Item * item1, const Item * item2)
void ShowThreads::ReadFiles() void ShowThreads::ReadFiles()
{ {
// reading files // reading files
DbItemQuery iq; // DbItemQuery iq;
iq.SetAll(false, false); // iq.SetAll(false, false);
iq.sel_url = true; // iq.sel_url = true;
iq.sel_subject = true; // iq.sel_subject = true;
iq.sel_date = true; // iq.sel_date = true;
iq.sel_user_id = true; // iq.sel_user_id = true;
iq.sel_group_id = true; // iq.sel_group_id = true;
iq.sel_guest_name = true; // iq.sel_guest_name = true;
iq.sel_privileges = true; // iq.sel_privileges = true;
iq.sel_date = true; // iq.sel_date = true;
iq.WhereParentId(cur->request->dir_tab.back()->id); // iq.WhereParentId(cur->request->dir_tab.back()->id);
iq.WhereType(Item::file); // iq.WhereType(Item::file);
iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE); // iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(thread_info->item_tab, iq); morm::Finder<Item> finder(model_connector);
thread_info->item_tab = finder.
select().
where().
eq(L"parent_id", cur->request->dir_tab.back()->id).
eq(L"type", static_cast<int>(Item::file)).
eq(L"content.file_type", WINIX_ITEM_FILETYPE_NONE).
get_vector();
//db->GetItems(thread_info->item_tab, iq);
system->CheckAccessToItems(thread_info->item_tab); system->CheckAccessToItems(thread_info->item_tab);
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2008-2014, Tomasz Sowa * Copyright (c) 2008-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -164,14 +164,14 @@ void thread_sort_tab_subject_noescape(Info & i)
void thread_sort_tab_content(Info & i) void thread_sort_tab_content(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.out << thread_info.item_sort_tab[item_sort_index]->content; i.out << thread_info.item_sort_tab[item_sort_index]->item_content.content_raw;
} }
void thread_sort_tab_content_noescape(Info & i) void thread_sort_tab_content_noescape(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.out << R(thread_info.item_sort_tab[item_sort_index]->content); i.out << R(thread_info.item_sort_tab[item_sort_index]->item_content.content_raw);
} }
@ -180,8 +180,8 @@ void thread_sort_tab_print_content(Info & i)
if( item_sort_index >= thread_info.item_sort_tab.size() ) if( item_sort_index >= thread_info.item_sort_tab.size() )
return; return;
std::wstring & content = thread_info.item_sort_tab[item_sort_index]->content; std::wstring & content = thread_info.item_sort_tab[item_sort_index]->item_content.content_raw;
Item::ContentType type = thread_info.item_sort_tab[item_sort_index]->content_type; ItemContent::ContentType type = thread_info.item_sort_tab[item_sort_index]->item_content.content_raw_type;
item_print_content(i.out, content, type); item_print_content(i.out, content, type);
} }
@ -190,7 +190,7 @@ void thread_sort_tab_print_content(Info & i)
void thread_sort_tab_privileges(Info & i) void thread_sort_tab_privileges(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.out << "0" << Toa(thread_info.item_sort_tab[item_sort_index]->privileges, 8); i.out << "0" << Toa(thread_info.item_sort_tab[item_sort_index]->item_content.privileges, 8);
} }
@ -251,8 +251,8 @@ void thread_sort_tab_user(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->user_id); User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->item_content.user_id);
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name); print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->item_content.guest_name);
} }
} }
@ -262,8 +262,8 @@ void thread_sort_tab_modification_user(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->modification_user_id); User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->item_content.modification_user_id);
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name); print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->item_content.guest_name);
} }
} }
@ -273,7 +273,7 @@ void thread_sort_tab_users_different(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
i.res = (thread_info.item_sort_tab[item_sort_index]->user_id != thread_info.item_sort_tab[item_sort_index]->modification_user_id); i.res = (thread_info.item_sort_tab[item_sort_index]->item_content.user_id != thread_info.item_sort_tab[item_sort_index]->item_content.modification_user_id);
} }
} }
@ -283,7 +283,7 @@ void thread_sort_tab_group(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
long group_id = thread_info.item_sort_tab[item_sort_index]->group_id; long group_id = thread_info.item_sort_tab[item_sort_index]->item_content.group_id;
Group * pgroup = system->groups.GetGroup(group_id); Group * pgroup = system->groups.GetGroup(group_id);
if( pgroup ) if( pgroup )
@ -298,7 +298,7 @@ void thread_sort_tab_date_creation(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
PT::Date date = system->ToLocal(thread_info.item_sort_tab[item_sort_index]->date_creation); PT::Date date = system->ToLocal(thread_info.item_sort_tab[item_sort_index]->item_content.date_creation);
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec); i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
} }
} }
@ -308,7 +308,7 @@ void thread_sort_tab_date_modification(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
PT::Date date = system->ToLocal(thread_info.item_sort_tab[item_sort_index]->date_modification); PT::Date date = system->ToLocal(thread_info.item_sort_tab[item_sort_index]->item_content.date_modification);
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec); i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
} }
} }
@ -318,7 +318,7 @@ void thread_sort_tab_date_creation_nice(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_creation); print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->item_content.date_creation);
} }
} }
@ -328,7 +328,7 @@ void thread_sort_tab_date_modification_nice(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_modification); print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->item_content.date_modification);
} }
} }
@ -337,8 +337,8 @@ void thread_sort_tab_dates_equal(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
PT::Date & date1 = thread_info.item_sort_tab[item_sort_index]->date_creation; PT::Date & date1 = thread_info.item_sort_tab[item_sort_index]->item_content.date_creation;
PT::Date & date2 = thread_info.item_sort_tab[item_sort_index]->date_modification; PT::Date & date2 = thread_info.item_sort_tab[item_sort_index]->item_content.date_modification;
i.res = date1 == date2; i.res = date1 == date2;
} }
@ -358,7 +358,7 @@ void thread_sort_tab_run(Info & i)
ezc_generator.SetPattern(*p); ezc_generator.SetPattern(*p);
ezc_generator.Generate(item_run_content); ezc_generator.Generate(item_run_content);
item_print_content(i.out, item_run_content.Str(), thread_info.item_sort_tab[item_sort_index]->content_type); item_print_content(i.out, item_run_content.Str(), thread_info.item_sort_tab[item_sort_index]->item_content.content_raw_type);
} }
else else
{ {
@ -373,8 +373,8 @@ void thread_sort_tab_has_static_file(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
{ {
i.res = thread_info.item_sort_tab[item_sort_index]->file_type != WINIX_ITEM_FILETYPE_NONE && i.res = thread_info.item_sort_tab[item_sort_index]->item_content.file_type != WINIX_ITEM_FILETYPE_NONE &&
!thread_info.item_sort_tab[item_sort_index]->file_path.empty(); !thread_info.item_sort_tab[item_sort_index]->item_content.file_path.empty();
} }
} }
@ -382,7 +382,7 @@ void thread_sort_tab_has_static_file(Info & i)
void thread_sort_tab_has_thumb(Info & i) void thread_sort_tab_has_thumb(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.res = thread_info.item_sort_tab[item_sort_index]->has_thumb; i.res = thread_info.item_sort_tab[item_sort_index]->item_content.file_has_thumb;
} }
@ -410,21 +410,21 @@ void thread_sort_tab_type_is_symlink(Info & i)
void thread_sort_tab_is_link_to(Info & i) void thread_sort_tab_is_link_to(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.res = !thread_info.item_sort_tab[item_sort_index]->link_to.empty(); i.res = !thread_info.item_sort_tab[item_sort_index]->item_content.link_to.empty();
} }
void thread_sort_tab_link_to(Info & i) void thread_sort_tab_link_to(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.out << thread_info.item_sort_tab[item_sort_index]->link_to; i.out << thread_info.item_sort_tab[item_sort_index]->item_content.link_to;
} }
void thread_sort_tab_is_link_redirect(Info & i) void thread_sort_tab_is_link_redirect(Info & i)
{ {
if( item_sort_index < thread_info.item_sort_tab.size() ) if( item_sort_index < thread_info.item_sort_tab.size() )
i.res = thread_info.item_sort_tab[item_sort_index]->link_redirect == 1; i.res = thread_info.item_sort_tab[item_sort_index]->item_content.link_redirect == 1;
} }
@ -455,7 +455,7 @@ void thread_sort_tab_last_item_date_modification_nice(Info & i)
if( thread.last_item_id != -1 ) if( thread.last_item_id != -1 )
print_date_nice(i, thread.last_item_date_modification); print_date_nice(i, thread.last_item_date_modification);
else else
print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->date_modification); print_date_nice(i, thread_info.item_sort_tab[item_sort_index]->item_content.date_modification);
} }
} }
} }
@ -476,8 +476,8 @@ void thread_sort_tab_last_item_user(Info & i)
} }
else else
{ {
User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->user_id); User * puser = system->users.GetUser(thread_info.item_sort_tab[item_sort_index]->item_content.user_id);
print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->guest_name); print_user_name(i, puser, thread_info.item_sort_tab[item_sort_index]->item_content.guest_name);
} }
} }
} }

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2010-2018, Tomasz Sowa * Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -99,7 +99,13 @@ void ThreadInfo::RemoveThread(long file_id)
if( tdb->GetAnswers(file_id, remove_answer_id_tab) == WINIX_ERR_OK ) if( tdb->GetAnswers(file_id, remove_answer_id_tab) == WINIX_ERR_OK )
{ {
for(size_t i=0 ; i<remove_answer_id_tab.size() ; ++i) for(size_t i=0 ; i<remove_answer_id_tab.size() ; ++i)
db->DelFileById(remove_answer_id_tab[i]); {
Item item;
item.set_connector(model_connector);
item.id = remove_answer_id_tab[i];
item.remove(); // CHECKME is it correct to set only 'id' and call 'remove'?
//db->DelFileById(remove_answer_id_tab[i]);
}
} }
tdb->RemoveThread(file_id); tdb->RemoveThread(file_id);
@ -116,12 +122,22 @@ void ThreadInfo::RemoveThreadAnswer(long answer_id)
void ThreadInfo::RepairAnswer(long answer_id) void ThreadInfo::RepairAnswer(long answer_id)
{ {
iq.Clear(); // iq.Clear();
iq.SetAll(false, false); // iq.SetAll(false, false);
iq.WhereId(answer_id); // iq.WhereId(answer_id);
iq.WhereType(Item::file); // !! moze w przyszlosci pozwolic takze na symlinki? // iq.WhereType(Item::file); // !! moze w przyszlosci pozwolic takze na symlinki?
if( db->GetItem(repair_item, iq) == WINIX_ERR_NO_ITEM ) morm::Finder<Item> finder(model_connector);
repair_item = finder.
select().
where().
eq(L"id", answer_id).
eq(L"type", static_cast<int>(Item::file)).
get();
//if( db->GetItem(repair_item, iq) == WINIX_ERR_NO_ITEM )
if( !repair_item.found() )
{ {
log << log3 << "ThreadInfo: there is no a file for thread answer_id: " << answer_id << logend; log << log3 << "ThreadInfo: there is no a file for thread answer_id: " << answer_id << logend;
tdb->RemoveAnswerOnly(answer_id); tdb->RemoveAnswerOnly(answer_id);
@ -141,12 +157,21 @@ void ThreadInfo::RepairAnswers(long file_id)
void ThreadInfo::Repair(long file_id) void ThreadInfo::Repair(long file_id)
{ {
iq.Clear(); // iq.Clear();
iq.SetAll(false, false); // iq.SetAll(false, false);
iq.WhereId(file_id); // iq.WhereId(file_id);
iq.WhereType(Item::file); // !! moze w przyszlosci pozwolic takze na symlinki? // iq.WhereType(Item::file); // !! moze w przyszlosci pozwolic takze na symlinki?
if( db->GetItem(repair_item, iq) == WINIX_ERR_NO_ITEM ) morm::Finder<Item> finder(model_connector);
repair_item = finder.
select().
where().
eq(L"id", file_id).
eq(L"type", static_cast<int>(Item::file)).
get();
if( !repair_item.found() )
{ {
log << log3 << "ThreadInfo: there is no a file for thread file_id: " << file_id << logend; log << log3 << "ThreadInfo: there is no a file for thread file_id: " << file_id << logend;
tdb->RemoveThread(file_id); tdb->RemoveThread(file_id);

Some files were not shown because too many files have changed in this diff Show More