some workarounds in Thread plugin (don't show stale info in html forms)

This commit is contained in:
2021-05-27 10:29:26 +02:00
parent fb64f5e456
commit aa71abd725
4 changed files with 47 additions and 2 deletions

View File

@@ -132,6 +132,17 @@ void Reply::MakePost()
answer.parent_id = files_dir->id;
answer.item_content.privileges = system->NewFilePrivileges();
/*
* temporary
* html templates are using last_item, and if CheckAbuse() returned true
* then the form would be empty
*
* here would be better to have something like last_item pointing to answer
* so when CheckAbuse() returned true thew we would show provieded values in the html form
*/
cur->request->last_item = &cur->request->item;
cur->request->item.item_content.guest_name.clear();
if( functions->CheckAbuse() )
return;
@@ -157,6 +168,18 @@ void Reply::MakePost()
}
void Reply::MakeGet()
{
/*
* workaround:
* html form showed the nick name from item
* this will be removed when new ezc object templates will be implemented
* we can provide two item templates: one for [item_url] and the rest for the html form
* [item_url] is used in <form...>
*/
cur->request->item.item_content.guest_name.clear();
}
} // namespace