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

@@ -102,6 +102,13 @@ void CreateThread::MakePost()
cur->request->item.parent_id = cur->request->dir_tab.back()->id;
cur->request->item.item_content.privileges = system->NewFilePrivileges();
/*
* temporary
* html templates are using last_item, and if CheckAbuse() returned true
* then the form would be empty
*/
cur->request->last_item = &cur->request->item;
if( functions->CheckAbuse() )
return;
@@ -134,6 +141,17 @@ void CreateThread::MakePost()
}
void CreateThread::MakeGet()
{
/*
* workaround:
* html form showed the title from the last directory
* this will be removed when new ezc object templates will be implemented
*/
empty_item.Clear();
cur->request->last_item = &empty_item;
}