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:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2018, Tomasz Sowa
|
||||
* Copyright (c) 2010-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -169,7 +169,7 @@ bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
|
||||
conf_parser.SetSpace(conf_tab[mount_dir_id].conf);
|
||||
conf_tab[mount_dir_id].conf.Clear();
|
||||
|
||||
return (conf_parser.ParseString(config_file.content) == PT::SpaceParser::ok);
|
||||
return (conf_parser.ParseString(config_file.item_content.content_raw) == PT::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
@@ -394,8 +394,8 @@ void TicketInfo::ReadTicketValue(PT::Space & space,
|
||||
file.Clear(); // clearing and setting date
|
||||
file.parent_id = upload_dir.id;
|
||||
file.type = Item::file;
|
||||
file.privileges = system->NewFilePrivileges();
|
||||
file.file_type = SelectFileType(value.filename);
|
||||
file.item_content.privileges = system->NewFilePrivileges();
|
||||
file.item_content.file_type = SelectFileType(value.filename);
|
||||
file.url = value.filename;
|
||||
functions->PrepareUrl(file);
|
||||
functions->SetUser(file);
|
||||
@@ -406,7 +406,7 @@ void TicketInfo::ReadTicketValue(PT::Space & space,
|
||||
PT::Space & space = FindAddMetaByParam(meta, param_id);
|
||||
PT::Space & file_space = space.AddSpace(L"file");
|
||||
|
||||
if( file.file_type == WINIX_ITEM_FILETYPE_IMAGE )
|
||||
if( file.item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE )
|
||||
file_space.Add(L"type", L"image");
|
||||
else
|
||||
file_space.Add(L"type", L"file");
|
||||
@@ -616,7 +616,7 @@ void TicketInfo::RemoveTicket(long file_id)
|
||||
|
||||
void TicketInfo::CopyTicketSpace(PT::Space & ticket_space, Item & item)
|
||||
{
|
||||
PT::Space & ticket_meta = item.meta.FindAddSpace(L"ticket");
|
||||
PT::Space & ticket_meta = item.item_content.meta.FindAddSpace(L"ticket");
|
||||
ticket_meta = ticket_space;
|
||||
ticket_meta.name = L"ticket";
|
||||
}
|
||||
|
Reference in New Issue
Block a user