remove Request::post_tab and add Request::http_status
Instead of Reqest::post_tab we use now Request::post_in (pt::Space). Request::http_status will be used instead Request::status, but at the moment is not changed in all places. Request::status has been marked as depracated. While here: - Check for root dir in App and not in FunctionParser, let FunctionParser only log the root dir. - Read post variables after parsing url parameters, this allows winix functions to set limits for post input. - Set limits when parsing input json format, new options added to config: post_max_object_items, post_max_table_items, post_max_all_items, post_max_nested_objects. There are similar options in each winix function (they are in FunctionBase). - Some refactoring in App. - Add config option: log_whole_http_post if true then the whole parsed post input is logged. - Add config option: post_json_max - max length of input stream for parsing json. - Add config option: templates_request_status, default request_status.html this is an ezc template used as [content] when the request status is not 200_ok. - Fix: Sort winix function didn't show items to sort (fix and do some refactoring as well) - Properly sort items in: ImgCrop, Ls, Sort, Upload - Remove ezc templates: err_404.html, err_per_denied.html - now request_status.html is used.
This commit is contained in:
@@ -576,7 +576,6 @@ bool TicketInfo::DeleteTicketFile(Ticket & ticket, long file_id, pt::Space & met
|
||||
|
||||
void TicketInfo::ReadTicketParams(Ticket & ticket, bool clear_ticket, pt::Space & meta, bool & file_was_deleted)
|
||||
{
|
||||
PostTab::iterator i;
|
||||
PostFileTab::iterator i2;
|
||||
|
||||
file_was_deleted = false;
|
||||
@@ -587,23 +586,34 @@ PostFileTab::iterator i2;
|
||||
// !! IMPROVE ME move me somewhere
|
||||
std::wstring ticket_delete_prefix = L"ticketdeletefile_";
|
||||
|
||||
for(i=cur->request->post_tab.begin() ; i!=cur->request->post_tab.end() ; ++i)
|
||||
if( cur->request->post_in.is_object() )
|
||||
{
|
||||
// !! 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) )
|
||||
{
|
||||
long param_id = Tol(i->first.c_str() + config->ticket_form_prefix.size());
|
||||
ReadTicketParam(ticket, param_id, i->second, meta);
|
||||
}
|
||||
// WARNING
|
||||
// code not tested when changed to using post_in
|
||||
|
||||
if( pt::is_substr(ticket_delete_prefix, i->first) )
|
||||
{
|
||||
long file_id = Tol(i->first.c_str() + ticket_delete_prefix.size());
|
||||
pt::Space::ObjectType::iterator i = cur->request->post_in.value.value_object.begin();
|
||||
|
||||
if( DeleteTicketFile(ticket, file_id, meta) )
|
||||
for( ; i != cur->request->post_in.value.value_object.end() ; ++i)
|
||||
{
|
||||
if( i->second->is_wstr() )
|
||||
{
|
||||
file_was_deleted = true;
|
||||
// !! 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) )
|
||||
{
|
||||
long param_id = Tol(i->first.c_str() + config->ticket_form_prefix.size());
|
||||
ReadTicketParam(ticket, param_id, *i->second->get_wstr(), meta);
|
||||
}
|
||||
}
|
||||
|
||||
if( pt::is_substr(ticket_delete_prefix, i->first) )
|
||||
{
|
||||
long file_id = Tol(i->first.c_str() + ticket_delete_prefix.size());
|
||||
|
||||
if( DeleteTicketFile(ticket, file_id, meta) )
|
||||
{
|
||||
file_was_deleted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user