added: setting a correct mime type for static files - using magic library
added: std::wstring file_mime_type to ItemContent - a mime type for static file added: Header (core/header.h) - there will be header names defined, at the moment only content_type added: FuncionsBase::Finish() - it is called at the end when the winix finishes
This commit is contained in:
@@ -74,6 +74,7 @@ void ItemContent::fields()
|
||||
field(L"file_path", file_path);
|
||||
field(L"file_fs", file_fs);
|
||||
field(L"file_type", file_type);
|
||||
field(L"file_mime_type", file_mime_type);
|
||||
field(L"file_has_thumb", file_has_thumb);
|
||||
field(L"file_hash", file_hash);
|
||||
field(L"file_hash_type", file_hash_type);
|
||||
@@ -192,6 +193,7 @@ bool ItemContent::do_migration(int & current_table_version)
|
||||
ok = ok && morm::Model::do_migration(current_table_version, 2, this, &ItemContent::do_migration_to_2);
|
||||
ok = ok && morm::Model::do_migration(current_table_version, 3, this, &ItemContent::do_migration_to_3);
|
||||
ok = ok && morm::Model::do_migration(current_table_version, 4, this, &ItemContent::do_migration_to_4);
|
||||
ok = ok && morm::Model::do_migration(current_table_version, 5, this, &ItemContent::do_migration_to_5);
|
||||
|
||||
return ok;
|
||||
}
|
||||
@@ -278,6 +280,13 @@ bool ItemContent::do_migration_to_4()
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::do_migration_to_5()
|
||||
{
|
||||
const char * str = "alter table core.content add column file_mime_type varchar(256)";
|
||||
return db_query(str);
|
||||
}
|
||||
|
||||
|
||||
bool ItemContent::has_access(const User * current_user, int mask) const
|
||||
{
|
||||
if( current_user )
|
||||
|
Reference in New Issue
Block a user