@ -112,6 +112,10 @@ void Reply::MakePost()
// !! jak bedzie dostepne assert
// ASSERT(files_dir)
// is it a correct bahavior to set spam_score in session?
// after the first mistake the person will not be allowed to post anything
cur - > session - > spam_score = 0 ;
thread = Thread : : get_thread ( model_connector , cur - > request - > item . id ) ;
if ( ! thread . found ( ) )
@ -143,8 +147,18 @@ void Reply::MakePost()
cur - > request - > last_item = & cur - > request - > item ;
cur - > request - > item . item_content . guest_name . clear ( ) ;
if ( functions - > CheckAbuse ( ) )
if ( functions - > CheckAbuse ( & slog ) )
{
// temporary: to show values in the html form
// this will be changed when a new ezc objects will be implemented
// there'll be two objects: one registered as [item..] and the other registered as [answer..]
// (one for url and the other for content)
cur - > request - > item . item_content . content_raw = answer . item_content . content_raw ;
cur - > request - > item . item_content . content_raw_type = answer . item_content . content_raw_type ;
cur - > request - > item . item_content . guest_name = answer . item_content . guest_name ;
return ;
}
plugin - > Call ( WINIX_PL_THREAD_PREPARE_TO_REPLY_IN_THREAD , & answer ) ;
@ -157,7 +171,17 @@ void Reply::MakePost()
if ( cur - > request - > status = = WINIX_ERR_OK )
{
log < < log2 < < " Reply: added an answer in a thread " < < logend ;
thread_info - > MakeRedirectIfPossible ( cur - > request - > item ) ;
const wchar_t * postfix = nullptr ;
if ( cur - > request - > IsParam ( L " scrollup " ) )
postfix = L " /-/scrollup " ;
if ( cur - > request - > IsParam ( L " scrolldown " ) )
postfix = L " /-/scrolldown " ;
thread_info - > MakeRedirectIfPossible ( cur - > request - > item , postfix ) ;
SendNotify ( cur - > request - > item ) ;
}
else
@ -172,12 +196,14 @@ void Reply::MakeGet()
{
/*
* workaround :
* html form showed the nick name from item
* html form showed the nick name from item ( and content )
* 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 ( ) ;
cur - > request - > item . item_content . content_raw . clear ( ) ;
}