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:
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2018, Tomasz Sowa
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -258,7 +258,7 @@ void dir_childs_tab_url(Info & i)
|
||||
void dir_childs_tab_privileges(Info & i)
|
||||
{
|
||||
if( dir_childs_index < dir_childs_table.size() )
|
||||
i.out << "0" << Toa(dir_childs_table[dir_childs_index]->privileges, 8);
|
||||
i.out << "0" << Toa(dir_childs_table[dir_childs_index]->item_content.privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ void dir_childs_tab_user(Info & i)
|
||||
{
|
||||
if( dir_childs_index < dir_childs_table.size() )
|
||||
{
|
||||
long user_id = dir_childs_table[dir_childs_index]->user_id;
|
||||
long user_id = dir_childs_table[dir_childs_index]->item_content.user_id;
|
||||
User * puser = system->users.GetUser(user_id);
|
||||
|
||||
if( puser )
|
||||
@@ -275,8 +275,8 @@ void dir_childs_tab_user(Info & i)
|
||||
{
|
||||
i.out << "~";
|
||||
|
||||
if( !dir_childs_table[dir_childs_index]->guest_name.empty() )
|
||||
i.out << dir_childs_table[dir_childs_index]->guest_name;
|
||||
if( !dir_childs_table[dir_childs_index]->item_content.guest_name.empty() )
|
||||
i.out << dir_childs_table[dir_childs_index]->item_content.guest_name;
|
||||
else
|
||||
i.out << "guest"; // !! dodac do konfiga
|
||||
}
|
||||
@@ -289,7 +289,7 @@ void dir_childs_tab_group(Info & i)
|
||||
{
|
||||
if( dir_childs_index < dir_childs_table.size() )
|
||||
{
|
||||
long group_id = dir_childs_table[dir_childs_index]->group_id;
|
||||
long group_id = dir_childs_table[dir_childs_index]->item_content.group_id;
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
if( pgroup )
|
||||
@@ -349,13 +349,13 @@ void dir_tab_subject(Info & i)
|
||||
|
||||
void dir_last_link_to(Info & i)
|
||||
{
|
||||
i.out << cur->request->dir_tab.back()->link_to;
|
||||
i.out << cur->request->dir_tab.back()->item_content.link_to;
|
||||
}
|
||||
|
||||
|
||||
void dir_last_is_link_redirect(Info & i)
|
||||
{
|
||||
i.res = cur->request->dir_tab.back()->link_redirect == 1;
|
||||
i.res = cur->request->dir_tab.back()->item_content.link_redirect == 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ void dir_last_subject(Info & i)
|
||||
|
||||
void dir_last_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->dir_tab.back()->user_id);
|
||||
User * puser = system->users.GetUser(cur->request->dir_tab.back()->item_content.user_id);
|
||||
|
||||
if( puser )
|
||||
i.out << puser->name;
|
||||
@@ -375,8 +375,8 @@ void dir_last_user(Info & i)
|
||||
{
|
||||
i.out << "~";
|
||||
|
||||
if( !cur->request->dir_tab.back()->guest_name.empty() )
|
||||
i.out << cur->request->dir_tab.back()->guest_name;
|
||||
if( !cur->request->dir_tab.back()->item_content.guest_name.empty() )
|
||||
i.out << cur->request->dir_tab.back()->item_content.guest_name;
|
||||
else
|
||||
i.out << "guest"; // !! dodac do konfiga
|
||||
}
|
||||
@@ -402,35 +402,35 @@ void dir_last_url_is_no(Info & i)
|
||||
|
||||
void dir_last_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->date_creation);
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->dir_tab.back()->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_creation_nice(Info & i)
|
||||
{
|
||||
print_date_nice(i, cur->request->dir_tab.back()->date_creation);
|
||||
print_date_nice(i, cur->request->dir_tab.back()->item_content.date_creation);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_modification_nice(Info & i)
|
||||
{
|
||||
print_date_nice(i, cur->request->dir_tab.back()->date_modification);
|
||||
print_date_nice(i, cur->request->dir_tab.back()->item_content.date_modification);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_last_dates_equal(Info & i)
|
||||
{
|
||||
PT::Date & date1 = cur->request->dir_tab.back()->date_creation;
|
||||
PT::Date & date2 = cur->request->dir_tab.back()->date_modification;
|
||||
PT::Date & date1 = cur->request->dir_tab.back()->item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->dir_tab.back()->item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
@@ -438,14 +438,14 @@ void dir_last_dates_equal(Info & i)
|
||||
|
||||
void dir_last_users_different(Info & i)
|
||||
{
|
||||
i.res = (cur->request->dir_tab.back()->user_id != cur->request->dir_tab.back()->modification_user_id);
|
||||
i.res = (cur->request->dir_tab.back()->item_content.user_id != cur->request->dir_tab.back()->item_content.modification_user_id);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_modification_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->dir_tab.back()->modification_user_id);
|
||||
print_user_name(i, puser, cur->request->dir_tab.back()->guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->dir_tab.back()->item_content.modification_user_id);
|
||||
print_user_name(i, puser, cur->request->dir_tab.back()->item_content.guest_name);
|
||||
}
|
||||
|
||||
|
||||
@@ -464,32 +464,32 @@ void dir_last_has_html_template(Info & i)
|
||||
|
||||
void dir_last_meta_str(Info & i)
|
||||
{
|
||||
cur->request->dir_tab.back()->meta.Serialize(i.out, true, false);
|
||||
cur->request->dir_tab.back()->item_content.meta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->dir_tab.back()->meta);
|
||||
space_value(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->dir_tab.back()->meta);
|
||||
space_list_tab(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->meta, L"dir_last_meta_tab");
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_last_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->meta, L"dir_last_meta_tab");
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
@@ -497,31 +497,31 @@ void dir_last_meta_tab_has_next(Info & i)
|
||||
|
||||
void dir_last_admin_meta_str(Info & i)
|
||||
{
|
||||
cur->request->dir_tab.back()->ameta.Serialize(i.out, true, false);
|
||||
cur->request->dir_tab.back()->item_content.meta_admin.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->dir_tab.back()->ameta);
|
||||
space_value(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->dir_tab.back()->ameta);
|
||||
space_list_tab(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->ameta, L"dir_last_admin_meta_tab");
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->ameta, L"dir_last_admin_meta_tab");
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011-2014, Tomasz Sowa
|
||||
* Copyright (c) 2011-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -77,7 +77,7 @@ void insert_page_run(Info & i)
|
||||
InitGenerator(info.ezc_gen);
|
||||
info.ezc_gen.SetPattern(*pat);
|
||||
info.ezc_gen.Generate(info.run_content);
|
||||
item_print_content(i.out, info.run_content.Str(), info.item.content_type);
|
||||
item_print_content(i.out, info.run_content.Str(), info.item.item_content.content_raw_type);
|
||||
|
||||
insert_page_cur -= 1;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ void insert_page(Info & i)
|
||||
insert_page_run(i);
|
||||
else
|
||||
if( system->HasReadAccess(info.item) )
|
||||
item_print_content(i.out, info.item.content, info.item.content_type);
|
||||
item_print_content(i.out, info.item.item_content.content_raw, info.item.item_content.content_raw_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2018, Tomasz Sowa
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -88,14 +88,14 @@ void item_subject_noescape(Info & i)
|
||||
|
||||
void item_content(Info & i)
|
||||
{
|
||||
i.out << cur->request->last_item->content;
|
||||
i.out << cur->request->last_item->item_content.content_raw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_content_noescape(Info & i)
|
||||
{
|
||||
i.out << R(cur->request->last_item->content);
|
||||
i.out << R(cur->request->last_item->item_content.content_raw);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,19 +103,19 @@ void item_content_type_is(Item & item, Info & i)
|
||||
{
|
||||
i.res = false;
|
||||
|
||||
if( item.content_type == Item::ct_text && i.par == L"text" )
|
||||
if( item.item_content.content_raw_type == ItemContent::ct_text && i.par == L"text" )
|
||||
i.res = true;
|
||||
else
|
||||
if( item.content_type == Item::ct_formatted_text && i.par == L"formatted text" )
|
||||
if( item.item_content.content_raw_type == ItemContent::ct_formatted_text && i.par == L"formatted text" )
|
||||
i.res = true;
|
||||
else
|
||||
if( item.content_type == Item::ct_html && i.par == L"html" )
|
||||
if( item.item_content.content_raw_type == ItemContent::ct_html && i.par == L"html" )
|
||||
i.res = true;
|
||||
else
|
||||
if( item.content_type == Item::ct_bbcode && i.par == L"bbcode" )
|
||||
if( item.item_content.content_raw_type == ItemContent::ct_bbcode && i.par == L"bbcode" )
|
||||
i.res = true;
|
||||
else
|
||||
if( item.content_type == Item::ct_other && i.par == L"other" )
|
||||
if( item.item_content.content_raw_type == ItemContent::ct_other && i.par == L"other" )
|
||||
i.res = true;
|
||||
}
|
||||
|
||||
@@ -126,22 +126,22 @@ void item_content_type_is(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_print_content(HtmlTextStream & out, const std::wstring & content, Item::ContentType content_type)
|
||||
void item_print_content(HtmlTextStream & out, const std::wstring & content, ItemContent::ContentType content_type)
|
||||
{
|
||||
if( config->html_filter && !Item::CanContentBeHtmlFiltered(content_type) )
|
||||
if( config->html_filter && !ItemContent::CanContentBeHtmlFiltered(content_type) )
|
||||
out << R("<nofilter>");
|
||||
|
||||
if( content_type == Item::ct_text )
|
||||
if( content_type == ItemContent::ct_text )
|
||||
{
|
||||
out << content;
|
||||
}
|
||||
else
|
||||
if( content_type == Item::ct_formatted_text )
|
||||
if( content_type == ItemContent::ct_formatted_text )
|
||||
{
|
||||
HtmlEscapeFormTxt(out, content);
|
||||
}
|
||||
else
|
||||
if( content_type == Item::ct_bbcode )
|
||||
if( content_type == ItemContent::ct_bbcode )
|
||||
{
|
||||
static std::wstring out_temp;
|
||||
out_temp.clear();
|
||||
@@ -156,26 +156,26 @@ void item_print_content(HtmlTextStream & out, const std::wstring & content, Item
|
||||
out << R(content);
|
||||
}
|
||||
|
||||
if( config->html_filter && !Item::CanContentBeHtmlFiltered(content_type) )
|
||||
if( config->html_filter && !ItemContent::CanContentBeHtmlFiltered(content_type) )
|
||||
out << R("</nofilter>");
|
||||
}
|
||||
|
||||
|
||||
void item_content_is_empty(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->content.empty();
|
||||
i.res = cur->request->last_item->item_content.content_raw.empty();
|
||||
}
|
||||
|
||||
void item_print_content(Info & i)
|
||||
{
|
||||
item_print_content(i.out, cur->request->last_item->content, cur->request->last_item->content_type);
|
||||
item_print_content(i.out, cur->request->last_item->item_content.content_raw, cur->request->last_item->item_content.content_raw_type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_privileges(Info & i)
|
||||
{
|
||||
i.out << Toa(cur->request->last_item->privileges, 8);
|
||||
i.out << Toa(cur->request->last_item->item_content.privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,19 +193,13 @@ void item_url(Info & i)
|
||||
|
||||
void item_url_is(Info & i)
|
||||
{
|
||||
if( !cur->request->is_item )
|
||||
return; // default false
|
||||
|
||||
i.res = (cur->request->last_item->url == i.par);
|
||||
}
|
||||
|
||||
|
||||
void item_url_is_no(Info & i)
|
||||
{
|
||||
if( !cur->request->is_item )
|
||||
i.res = true;
|
||||
else
|
||||
i.res = (cur->request->last_item->url != i.par);
|
||||
i.res = (cur->request->last_item->url != i.par);
|
||||
}
|
||||
|
||||
|
||||
@@ -226,25 +220,25 @@ void item_link(Info & i)
|
||||
|
||||
void item_filetype_is_none(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->last_item->item_content.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
void item_filetype_is_image(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->file_type == WINIX_ITEM_FILETYPE_IMAGE;
|
||||
i.res = cur->request->last_item->item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE;
|
||||
}
|
||||
|
||||
|
||||
void item_has_static_file(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->file_type != WINIX_ITEM_FILETYPE_NONE && !cur->request->last_item->file_path.empty();
|
||||
i.res = cur->request->last_item->item_content.file_type != WINIX_ITEM_FILETYPE_NONE && !cur->request->last_item->item_content.file_path.empty();
|
||||
}
|
||||
|
||||
|
||||
void item_has_thumb(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->has_thumb;
|
||||
i.res = cur->request->last_item->item_content.file_has_thumb;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,55 +264,55 @@ void item_can_remove(Info & i)
|
||||
|
||||
void item_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->last_item->user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->last_item->item_content.user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->item_content.guest_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_modification_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->last_item->modification_user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->last_item->item_content.modification_user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->item_content.guest_name);
|
||||
}
|
||||
|
||||
|
||||
void item_users_different(Info & i)
|
||||
{
|
||||
i.res = (cur->request->last_item->user_id != cur->request->last_item->modification_user_id);
|
||||
i.res = (cur->request->last_item->item_content.user_id != cur->request->last_item->item_content.modification_user_id);
|
||||
}
|
||||
|
||||
|
||||
void item_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->date_creation);
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void item_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void item_date_creation_nice(Info & i)
|
||||
{
|
||||
print_date_nice(i, cur->request->last_item->date_creation);
|
||||
print_date_nice(i, cur->request->last_item->item_content.date_creation);
|
||||
}
|
||||
|
||||
|
||||
void item_date_modification_nice(Info & i)
|
||||
{
|
||||
print_date_nice(i, cur->request->last_item->date_modification);
|
||||
print_date_nice(i, cur->request->last_item->item_content.date_modification);
|
||||
}
|
||||
|
||||
|
||||
void item_dates_equal(Info & i)
|
||||
{
|
||||
PT::Date & date1 = cur->request->last_item->date_creation;
|
||||
PT::Date & date2 = cur->request->last_item->date_modification;
|
||||
PT::Date & date1 = cur->request->last_item->item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->last_item->item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
@@ -346,7 +340,7 @@ void item_run(Info & i)
|
||||
else
|
||||
ezc_generator.Generate(item_run_content);
|
||||
|
||||
item_print_content(i.out, item_run_content.Str(), cur->request->last_item->content_type);
|
||||
item_print_content(i.out, item_run_content.Str(), cur->request->last_item->item_content.content_raw_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,7 +351,7 @@ void item_run(Info & i)
|
||||
|
||||
void item_guest_name(Info & i)
|
||||
{
|
||||
i.out << cur->request->last_item->guest_name;
|
||||
i.out << cur->request->last_item->item_content.guest_name;
|
||||
}
|
||||
|
||||
|
||||
@@ -393,24 +387,24 @@ void item_type_is_symlink(Info & i)
|
||||
|
||||
void item_is_link_to(Info & i)
|
||||
{
|
||||
i.res = !cur->request->last_item->link_to.empty();
|
||||
i.res = !cur->request->last_item->item_content.link_to.empty();
|
||||
}
|
||||
|
||||
|
||||
void item_link_to(Info & i)
|
||||
{
|
||||
i.out << cur->request->last_item->link_to;
|
||||
i.out << cur->request->last_item->item_content.link_to;
|
||||
}
|
||||
|
||||
|
||||
void item_is_link_redirect(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->link_redirect == 1;
|
||||
i.res = cur->request->last_item->item_content.link_redirect == 1;
|
||||
}
|
||||
|
||||
void item_file_size(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->file_size;
|
||||
i.res = cur->request->last_item->item_content.file_size;
|
||||
}
|
||||
|
||||
void item_sort(Info & i)
|
||||
@@ -422,39 +416,39 @@ void item_sort(Info & i)
|
||||
|
||||
void item_meta_str(Info & i)
|
||||
{
|
||||
cur->request->last_item->meta.Serialize(i.out, true, false);
|
||||
cur->request->last_item->item_content.meta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void item_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->last_item->meta); // !! a new interface (last_item instead of item)
|
||||
space_value(i, cur->request->last_item->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void item_meta_noescape(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->last_item->meta, false);
|
||||
space_value(i, cur->request->last_item->item_content.meta, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->last_item->meta);
|
||||
space_list_tab(i, cur->request->last_item->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void item_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->last_item->meta, L"item_meta_tab");
|
||||
space_list_tab_value(i, cur->request->last_item->item_content.meta, L"item_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void item_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->last_item->meta, L"item_meta_tab");
|
||||
space_list_tab_has_next(i, cur->request->last_item->item_content.meta, L"item_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
@@ -462,37 +456,37 @@ void item_meta_tab_has_next(Info & i)
|
||||
|
||||
void item_admin_meta_str(Info & i)
|
||||
{
|
||||
cur->request->last_item->ameta.Serialize(i.out, true, false);
|
||||
cur->request->last_item->item_content.meta_admin.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->last_item->ameta);
|
||||
space_value(i, cur->request->last_item->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->last_item->ameta);
|
||||
space_list_tab(i, cur->request->last_item->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->last_item->ameta, L"item_admin_meta_tab");
|
||||
space_list_tab_value(i, cur->request->last_item->item_content.meta_admin, L"item_admin_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
void item_admin_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->last_item->ameta, L"item_admin_meta_tab");
|
||||
space_list_tab_has_next(i, cur->request->last_item->item_content.meta_admin, L"item_admin_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
void item_can_content_be_html_filtered(Info & i)
|
||||
{
|
||||
i.res = cur->request->last_item->CanContentBeHtmlFiltered();
|
||||
i.res = cur->request->last_item->item_content.CanContentBeHtmlFiltered();
|
||||
}
|
||||
|
||||
|
||||
@@ -536,14 +530,14 @@ void item_tab_subject_noescape(Info & i)
|
||||
void item_tab_content(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.out << cur->request->item_tab[item_index].content;
|
||||
i.out << cur->request->item_tab[item_index].item_content.content_raw;
|
||||
}
|
||||
|
||||
|
||||
void item_tab_content_noescape(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.out << R(cur->request->item_tab[item_index].content);
|
||||
i.out << R(cur->request->item_tab[item_index].item_content.content_raw);
|
||||
}
|
||||
|
||||
|
||||
@@ -552,8 +546,8 @@ void item_tab_print_content(Info & i)
|
||||
if( item_index >= cur->request->item_tab.size() )
|
||||
return;
|
||||
|
||||
std::wstring & content = cur->request->item_tab[item_index].content;
|
||||
Item::ContentType type = cur->request->item_tab[item_index].content_type;
|
||||
std::wstring & content = cur->request->item_tab[item_index].item_content.content_raw;
|
||||
ItemContent::ContentType type = cur->request->item_tab[item_index].item_content.content_raw_type;
|
||||
|
||||
item_print_content(i.out, content, type);
|
||||
}
|
||||
@@ -562,7 +556,7 @@ void item_tab_print_content(Info & i)
|
||||
void item_tab_privileges(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.out << "0" << Toa(cur->request->item_tab[item_index].privileges, 8);
|
||||
i.out << "0" << Toa(cur->request->item_tab[item_index].item_content.privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +570,7 @@ void item_tab_dir(Info & i)
|
||||
if( system->dirs.MakePath(cur->request->item_tab[item_index].parent_id, path) )
|
||||
i.out << path;
|
||||
else
|
||||
i.out << "/the path does not exist/"; // !! do konfiga
|
||||
i.out << "/the path does not exist/"; // !! IMPROVEME move me to locales and put some info to log
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,14 +601,14 @@ void item_tab_link(Info & i)
|
||||
void item_tab_filetype_is_none(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.res = cur->request->item_tab[item_index].file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->item_tab[item_index].item_content.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
void item_tab_filetype_is_image(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.res = cur->request->item_tab[item_index].file_type == WINIX_ITEM_FILETYPE_IMAGE;
|
||||
i.res = cur->request->item_tab[item_index].item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE;
|
||||
}
|
||||
|
||||
|
||||
@@ -643,8 +637,8 @@ void item_tab_user(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->item_tab[item_index].user_id);
|
||||
print_user_name(i, puser, cur->request->item_tab[item_index].guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->item_tab[item_index].item_content.user_id);
|
||||
print_user_name(i, puser, cur->request->item_tab[item_index].item_content.guest_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,8 +648,8 @@ void item_tab_modification_user(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->item_tab[item_index].modification_user_id);
|
||||
print_user_name(i, puser, cur->request->item_tab[item_index].guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->item_tab[item_index].item_content.modification_user_id);
|
||||
print_user_name(i, puser, cur->request->item_tab[item_index].item_content.guest_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -665,7 +659,7 @@ void item_tab_users_different(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
i.res = (cur->request->item_tab[item_index].user_id != cur->request->item_tab[item_index].modification_user_id);
|
||||
i.res = (cur->request->item_tab[item_index].item_content.user_id != cur->request->item_tab[item_index].item_content.modification_user_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,7 +669,7 @@ void item_tab_group(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
long group_id = cur->request->item_tab[item_index].group_id;
|
||||
long group_id = cur->request->item_tab[item_index].item_content.group_id;
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
if( pgroup )
|
||||
@@ -690,7 +684,7 @@ void item_tab_date_creation(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].date_creation);
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
@@ -700,7 +694,7 @@ void item_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
@@ -710,7 +704,7 @@ void item_tab_date_creation_nice(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
print_date_nice(i, cur->request->item_tab[item_index].date_creation);
|
||||
print_date_nice(i, cur->request->item_tab[item_index].item_content.date_creation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,7 +714,7 @@ void item_tab_date_modification_nice(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
print_date_nice(i, cur->request->item_tab[item_index].date_modification);
|
||||
print_date_nice(i, cur->request->item_tab[item_index].item_content.date_modification);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,8 +723,8 @@ void item_tab_dates_equal(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date & date1 = cur->request->item_tab[item_index].date_creation;
|
||||
PT::Date & date2 = cur->request->item_tab[item_index].date_modification;
|
||||
PT::Date & date1 = cur->request->item_tab[item_index].item_content.date_creation;
|
||||
PT::Date & date2 = cur->request->item_tab[item_index].item_content.date_modification;
|
||||
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
@@ -753,7 +747,7 @@ void item_tab_run(Info & i)
|
||||
else
|
||||
ezc_generator.Generate(item_run_content);
|
||||
|
||||
item_print_content(i.out, item_run_content.Str(), cur->request->item_tab[item_index].content_type);
|
||||
item_print_content(i.out, item_run_content.Str(), cur->request->item_tab[item_index].item_content.content_raw_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -777,8 +771,8 @@ void item_tab_has_static_file(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
i.res = cur->request->item_tab[item_index].file_type != WINIX_ITEM_FILETYPE_NONE &&
|
||||
!cur->request->item_tab[item_index].file_path.empty();
|
||||
i.res = cur->request->item_tab[item_index].item_content.file_type != WINIX_ITEM_FILETYPE_NONE &&
|
||||
!cur->request->item_tab[item_index].item_content.file_path.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +780,7 @@ void item_tab_has_static_file(Info & i)
|
||||
void item_tab_has_thumb(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.res = cur->request->item_tab[item_index].has_thumb;
|
||||
i.res = cur->request->item_tab[item_index].item_content.file_has_thumb;
|
||||
}
|
||||
|
||||
|
||||
@@ -814,28 +808,28 @@ void item_tab_type_is_symlink(Info & i)
|
||||
void item_tab_is_link_to(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.res = !cur->request->item_tab[item_index].link_to.empty();
|
||||
i.res = !cur->request->item_tab[item_index].item_content.link_to.empty();
|
||||
}
|
||||
|
||||
|
||||
void item_tab_link_to(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.out << cur->request->item_tab[item_index].link_to;
|
||||
i.out << cur->request->item_tab[item_index].item_content.link_to;
|
||||
}
|
||||
|
||||
|
||||
void item_tab_is_link_redirect(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.res = cur->request->item_tab[item_index].link_redirect == 1;
|
||||
i.res = cur->request->item_tab[item_index].item_content.link_redirect == 1;
|
||||
}
|
||||
|
||||
|
||||
void item_tab_file_size(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
i.out << cur->request->item_tab[item_index].file_size;
|
||||
i.out << cur->request->item_tab[item_index].item_content.file_size;
|
||||
}
|
||||
|
||||
void item_tab_sort(Info & i)
|
||||
@@ -854,33 +848,33 @@ void item_tab_has_next(Info & i)
|
||||
void item_tab_meta_str(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
cur->request->item_tab[item_index].meta.Serialize(i.out, true, false);
|
||||
cur->request->item_tab[item_index].item_content.meta.Serialize(i.out, true, false);
|
||||
}
|
||||
|
||||
|
||||
void item_tab_meta(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space_value(i, cur->request->item_tab[item_index].meta);
|
||||
space_value(i, cur->request->item_tab[item_index].item_content.meta);
|
||||
}
|
||||
|
||||
void item_tab_meta_noescape(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space_value(i, cur->request->item_tab[item_index].meta, false);
|
||||
space_value(i, cur->request->item_tab[item_index].item_content.meta, false);
|
||||
}
|
||||
|
||||
void item_tab_meta_tab(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space_list_tab(i, cur->request->item_tab[item_index].meta);
|
||||
space_list_tab(i, cur->request->item_tab[item_index].item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void item_tab_meta_tab_value(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space_list_tab_value(i, cur->request->item_tab[item_index].meta, L"item_tab_meta_tab");
|
||||
space_list_tab_value(i, cur->request->item_tab[item_index].item_content.meta, L"item_tab_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
@@ -888,7 +882,7 @@ void item_tab_meta_tab_value(Info & i)
|
||||
void item_tab_meta_tab_has_next(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
space_list_tab_has_next(i, cur->request->item_tab[item_index].meta, L"item_tab_meta_tab");
|
||||
space_list_tab_has_next(i, cur->request->item_tab[item_index].item_content.meta, L"item_tab_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2018, Tomasz Sowa
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -126,7 +126,7 @@ void PatternCacher::CreatePattern(const Item & item, Ezc::Pattern & pattern)
|
||||
pattern_parser.AllowInclude(false);
|
||||
pattern_parser.DeleteWhiteTextItems(false);
|
||||
pattern_parser.SetLogger(&log);
|
||||
pattern_parser.ParseString(item.content, pattern);
|
||||
pattern_parser.ParseString(item.item_content.content_raw, pattern);
|
||||
|
||||
RebuildCache(pattern);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2018, Tomasz Sowa
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -37,11 +37,10 @@
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "core/item.h"
|
||||
#include "misc.h"
|
||||
#include "ezc.h"
|
||||
#include "core/winixbase.h"
|
||||
#include "models/item.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Tomasz Sowa
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -60,7 +60,7 @@ void priv_user_tab_init(Item & item)
|
||||
if( !cur->session->puser )
|
||||
{
|
||||
// not logged
|
||||
priv_user_table.push_back(item.user_id);
|
||||
priv_user_table.push_back(item.item_content.user_id);
|
||||
}
|
||||
else
|
||||
if( cur->session->puser->super_user )
|
||||
@@ -75,7 +75,7 @@ void priv_user_tab_init(Item & item)
|
||||
else
|
||||
{
|
||||
// others
|
||||
priv_user_table.push_back(item.user_id);
|
||||
priv_user_table.push_back(item.item_content.user_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,12 +133,12 @@ void priv_user_tab_isdefault(Info & i)
|
||||
|
||||
if( cur->request->is_item )
|
||||
{
|
||||
if( uid == cur->request->item.user_id )
|
||||
if( uid == cur->request->item.item_content.user_id )
|
||||
i.res = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( uid == cur->request->dir_tab.back()->user_id )
|
||||
if( uid == cur->request->dir_tab.back()->item_content.user_id )
|
||||
i.res = true;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ void priv_group_tab_init(Item & item)
|
||||
if( !cur->session->puser )
|
||||
{
|
||||
// not logged
|
||||
priv_group_table.push_back(item.group_id);
|
||||
priv_group_table.push_back(item.item_content.group_id);
|
||||
}
|
||||
else
|
||||
if( cur->session->puser->super_user )
|
||||
@@ -178,7 +178,7 @@ void priv_group_tab_init(Item & item)
|
||||
priv_group_table.push_back(-1);
|
||||
}
|
||||
else
|
||||
if( cur->session->puser->id == item.user_id )
|
||||
if( cur->session->puser->id == item.item_content.user_id )
|
||||
{
|
||||
bool was_current_group = false;
|
||||
// owner of the item -- is allowed to change only to a group in which he belongs to
|
||||
@@ -186,13 +186,13 @@ void priv_group_tab_init(Item & item)
|
||||
{
|
||||
priv_group_table.push_back(cur->session->puser->groups[i]);
|
||||
|
||||
if( item.group_id == cur->session->puser->groups[i] )
|
||||
if( item.item_content.group_id == cur->session->puser->groups[i] )
|
||||
was_current_group = true;
|
||||
}
|
||||
|
||||
// we're showing the item.group_id if it's different
|
||||
if( !was_current_group )
|
||||
priv_group_table.push_back(item.group_id);
|
||||
priv_group_table.push_back(item.item_content.group_id);
|
||||
|
||||
// switching to -1 is allowed too
|
||||
priv_group_table.push_back(-1);
|
||||
@@ -200,7 +200,7 @@ void priv_group_tab_init(Item & item)
|
||||
else
|
||||
{
|
||||
// not the owner and not a super user -- the same as not logged
|
||||
priv_group_table.push_back(item.group_id);
|
||||
priv_group_table.push_back(item.item_content.group_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,12 +258,12 @@ void priv_group_tab_isdefault(Info & i)
|
||||
|
||||
if( cur->request->is_item )
|
||||
{
|
||||
if( gid == cur->request->item.group_id )
|
||||
if( gid == cur->request->item.item_content.group_id )
|
||||
i.res = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( gid == cur->request->dir_tab.back()->group_id )
|
||||
if( gid == cur->request->dir_tab.back()->item_content.group_id )
|
||||
i.res = true;
|
||||
}
|
||||
}
|
||||
@@ -273,9 +273,9 @@ void priv_group_tab_isdefault(Info & i)
|
||||
void priv_privileges(Info & i)
|
||||
{
|
||||
if( cur->request->is_item )
|
||||
i.out << Toa(cur->request->item.privileges, 8);
|
||||
i.out << Toa(cur->request->item.item_content.privileges, 8);
|
||||
else
|
||||
i.out << Toa(cur->request->dir_tab.back()->privileges, 8);
|
||||
i.out << Toa(cur->request->dir_tab.back()->item_content.privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2014, Tomasz Sowa
|
||||
* Copyright (c) 2010-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -47,14 +47,14 @@ namespace TemplatesFunctions
|
||||
|
||||
void stat_item_type_is_file(Info & i)
|
||||
{
|
||||
i.res = cur->request->is_item && cur->request->item.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->is_item && cur->request->item.item_content.file_type == WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void stat_item_type_is_static_file(Info & i)
|
||||
{
|
||||
i.res = cur->request->is_item && cur->request->item.file_type != WINIX_ITEM_FILETYPE_NONE;
|
||||
i.res = cur->request->is_item && cur->request->item.item_content.file_type != WINIX_ITEM_FILETYPE_NONE;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,14 +74,14 @@ void stat_item_inode(Info & i)
|
||||
|
||||
void stat_item_user(Info & i)
|
||||
{
|
||||
User * puser = system->users.GetUser(cur->request->last_item->user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->guest_name);
|
||||
User * puser = system->users.GetUser(cur->request->last_item->item_content.user_id);
|
||||
print_user_name(i, puser, cur->request->last_item->item_content.guest_name);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_group(Info & i)
|
||||
{
|
||||
long group_id = cur->request->last_item->group_id;
|
||||
long group_id = cur->request->last_item->item_content.group_id;
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
if( pgroup )
|
||||
@@ -93,20 +93,20 @@ void stat_item_group(Info & i)
|
||||
|
||||
void stat_item_privileges(Info & i)
|
||||
{
|
||||
i.out << Toa(cur->request->last_item->privileges, 8);
|
||||
i.out << Toa(cur->request->last_item->item_content.privileges, 8);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->date_creation);
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_modification(Info & i)
|
||||
{
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->last_item->item_content.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace TemplatesFunctions
|
||||
void item_content_type_is(Item & item, Info & i);
|
||||
void item_content_type_is(Info & i);
|
||||
void item_content_is_empty(Info & i);
|
||||
void item_print_content(HtmlTextStream & out, const std::wstring & content, Item::ContentType content_type);
|
||||
void item_print_content(HtmlTextStream & out, const std::wstring & content, ItemContent::ContentType content_type);
|
||||
void item_print_content(Info & i);
|
||||
void item_privileges(Info & i);
|
||||
void item_dir(Info & i);
|
||||
|
||||
Reference in New Issue
Block a user