namespace PT renamed to pt

This commit is contained in:
2021-05-20 20:59:12 +02:00
parent d66a36cf21
commit e48a28a5c8
100 changed files with 597 additions and 597 deletions

View File

@@ -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.ParseSpace(config_file.item_content.content_raw) == PT::SpaceParser::ok);
return (conf_parser.ParseSpace(config_file.item_content.content_raw) == pt::SpaceParser::ok);
}
@@ -262,7 +262,7 @@ void TicketInfo::FindCurrentConf()
void TicketInfo::CheckMinMaxValue(PT::Space & space, Ticket::TicketParam & par)
void TicketInfo::CheckMinMaxValue(pt::Space & space, Ticket::TicketParam & par)
{
std::wstring * type = space.get_wstr(L"type");
@@ -307,7 +307,7 @@ void TicketInfo::CheckMinMaxValue(PT::Space & space, Ticket::TicketParam & par)
{
for(size_t a=0 ; a<space.child_spaces->size() ; ++a)
{
PT::Space & sp = *(*space.child_spaces)[a];
pt::Space & sp = *(*space.child_spaces)[a];
if( sp.name && *sp.name == L"option" && sp.to_long(L"id") == par.intv )
return;
@@ -323,20 +323,20 @@ void TicketInfo::CheckMinMaxValue(PT::Space & space, Ticket::TicketParam & par)
}
PT::Space & TicketInfo::FindAddMetaByParam(PT::Space & meta, long param)
pt::Space & TicketInfo::FindAddMetaByParam(pt::Space & meta, long param)
{
if( meta.child_spaces )
{
for(size_t i=0 ; i<meta.child_spaces->size() ; ++i)
{
PT::Space & sp = *(*meta.child_spaces)[i];
pt::Space & sp = *(*meta.child_spaces)[i];
if( sp.name && *sp.name == L"param" && sp.to_long(L"id") == param )
return sp;
}
}
PT::Space & sp = meta.add_child_space(L"param");
pt::Space & sp = meta.add_child_space(L"param");
sp.add(L"id", param);
return sp;
@@ -344,7 +344,7 @@ return sp;
bool TicketInfo::ReadTicketValue(PT::Space & space, long param_id, Ticket::TicketParam & par, const std::wstring & value, PT::Space & meta)
bool TicketInfo::ReadTicketValue(pt::Space & space, long param_id, Ticket::TicketParam & par, const std::wstring & value, pt::Space & meta)
{
if( space.is_equal(L"type", L"integer") ||
space.is_equal(L"type", L"progress") ||
@@ -360,7 +360,7 @@ bool TicketInfo::ReadTicketValue(PT::Space & space, long param_id, Ticket::Ticke
space.is_equal(L"type", L"multistring") )
{
// !! dodac cos co sprawdzi czy string nie zawiera znakow konca linii
PT::Space & sp = FindAddMetaByParam(meta, param_id);
pt::Space & sp = FindAddMetaByParam(meta, param_id);
sp.add(L"value", value);
return false;
}
@@ -391,10 +391,10 @@ return false;
void TicketInfo::ReadTicketValue(PT::Space & space,
void TicketInfo::ReadTicketValue(pt::Space & space,
long param_id,
const PostFile & value,
PT::Space & meta,
pt::Space & meta,
Item & upload_dir)
{
file.Clear(); // clearing and setting date
@@ -409,8 +409,8 @@ void TicketInfo::ReadTicketValue(PT::Space & space,
if( cur->request->status == WINIX_ERR_OK )
{
PT::Space & space = FindAddMetaByParam(meta, param_id);
PT::Space & file_space = space.add_child_space(L"file");
pt::Space & space = FindAddMetaByParam(meta, param_id);
pt::Space & file_space = space.add_child_space(L"file");
if( file.item_content.file_type == WINIX_ITEM_FILETYPE_IMAGE )
file_space.add(L"type", L"image");
@@ -428,8 +428,8 @@ void TicketInfo::ReadTicketValue(PT::Space & space,
}
void TicketInfo::ReadTicketValue(PT::Space & space,
long param_id, const PostFile & value, PT::Space & meta)
void TicketInfo::ReadTicketValue(pt::Space & space,
long param_id, const PostFile & value, pt::Space & meta)
{
std::wstring * type = space.get_wstr(L"type");
@@ -456,7 +456,7 @@ void TicketInfo::ReadTicketValue(PT::Space & space,
// adding a new parameter only if it not exists in ticket.par_tab
void TicketInfo::ReadTicketParam(PT::Space & space, Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta)
void TicketInfo::ReadTicketParam(pt::Space & space, Ticket & ticket, long param_id, const std::wstring & value, pt::Space & meta)
{
ticket_param.param = param_id;
@@ -481,7 +481,7 @@ void TicketInfo::ReadTicketParam(PT::Space & space, Ticket & ticket, long param_
void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstring & value, PT::Space & meta)
void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstring & value, pt::Space & meta)
{
ticket_param.Clear();
@@ -489,7 +489,7 @@ void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstr
{
for(size_t i=0 ; i<cur_conf->child_spaces->size() ; ++i)
{
PT::Space & space = *(*cur_conf->child_spaces)[i];
pt::Space & space = *(*cur_conf->child_spaces)[i];
if( space.name && *space.name == L"param" && space.to_long(L"id") == param_id )
{
@@ -504,13 +504,13 @@ void TicketInfo::ReadTicketParam(Ticket & ticket, long param_id, const std::wstr
// always adds a new parameter
void TicketInfo::ReadTicketParam(long param_id, const PostFile & value, PT::Space & meta)
void TicketInfo::ReadTicketParam(long param_id, const PostFile & value, pt::Space & meta)
{
if( cur_conf->child_spaces )
{
for(size_t i=0 ; i<cur_conf->child_spaces->size() ; ++i)
{
PT::Space & space = *(*cur_conf->child_spaces)[i];
pt::Space & space = *(*cur_conf->child_spaces)[i];
if( space.name && *space.name == L"param" && space.to_long(L"id") == param_id )
{
@@ -527,19 +527,19 @@ void TicketInfo::ReadTicketParam(long param_id, const PostFile & value, PT::Spac
bool TicketInfo::DeleteTicketFile(Ticket & ticket, long file_id, PT::Space & meta)
bool TicketInfo::DeleteTicketFile(Ticket & ticket, long file_id, pt::Space & meta)
{
if( meta.child_spaces )
{
for(size_t i=0 ; i<meta.child_spaces->size() ; ++i)
{
PT::Space & param = *(*meta.child_spaces)[i];
pt::Space & param = *(*meta.child_spaces)[i];
if( param.name && *param.name == L"param" && param.child_spaces )
{
for(size_t z=0 ; z<param.child_spaces->size() ; ++z)
{
PT::Space & file = *(*param.child_spaces)[z];
pt::Space & file = *(*param.child_spaces)[z];
if( file.name && *file.name == L"file" )
{
@@ -566,7 +566,7 @@ return false;
void TicketInfo::ReadTicketParams(Ticket & ticket, bool clear_ticket, PT::Space & meta, bool & file_was_deleted)
void TicketInfo::ReadTicketParams(Ticket & ticket, bool clear_ticket, pt::Space & meta, bool & file_was_deleted)
{
PostTab::iterator i;
PostFileTab::iterator i2;
@@ -583,13 +583,13 @@ PostFileTab::iterator i2;
{
// !! CHECKME why ticket_form_prefix is in the global config?
// (this is a plugin variable)
if( PT::is_substr(config->ticket_form_prefix, i->first) )
if( pt::is_substr(config->ticket_form_prefix, i->first) )
{
long param_id = Tol(i->first.c_str() + config->ticket_form_prefix.size());
ReadTicketParam(ticket, param_id, i->second, meta);
}
if( PT::is_substr(ticket_delete_prefix, i->first) )
if( pt::is_substr(ticket_delete_prefix, i->first) )
{
long file_id = Tol(i->first.c_str() + ticket_delete_prefix.size());
@@ -602,7 +602,7 @@ PostFileTab::iterator i2;
for(i2=cur->request->post_file_tab.begin() ; i2!=cur->request->post_file_tab.end() ; ++i2)
{
if( PT::is_substr(config->ticket_form_prefix, i2->first) )
if( pt::is_substr(config->ticket_form_prefix, i2->first) )
ReadTicketParam(Tol(i2->first.c_str() + config->ticket_form_prefix.size()), i2->second, meta);
}
@@ -629,9 +629,9 @@ void TicketInfo::RemoveTicket(long file_id)
}
void TicketInfo::CopyTicketSpace(PT::Space & ticket_space, Item & item)
void TicketInfo::CopyTicketSpace(pt::Space & ticket_space, Item & item)
{
PT::Space & ticket_meta = item.item_content.meta.find_add_child_space(L"ticket");
pt::Space & ticket_meta = item.item_content.meta.find_add_child_space(L"ticket");
ticket_meta = ticket_space;
}