added: Rebus

(when no logged user wants to send a message then he is asked a question)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@521 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-11-16 23:36:38 +00:00
parent c62d48160a
commit 2ca44ec361
25 changed files with 509 additions and 193 deletions

View File

@@ -22,7 +22,8 @@ bool Content::FunCreateThreadCheckAccess()
request.status = Error::permision_denied;
return false;
}
return true;
}
@@ -33,6 +34,36 @@ void Content::PostFunCreateThread()
if( !FunCreateThreadCheckAccess() )
return;
if( !CheckRebus() )
{
request.status = Error::rebus_bad_answer;
try
{
try
{
request.item.url = request.PostVar("url");
}
catch(...)
{
}
request.item.subject = request.PostVar("subject");
request.item.content = request.PostVar("content");
SetUser();
}
catch(...)
{
}
return;
}
request.post_table.insert( std::make_pair(std::string("url"), std::string()) ); // !! tymczasowo, zrobic aby mkdir i emacs nie rzucaly wyjatkiem gdy nie ma url zdefiniowanego
request.thread.parent_id = request.dir_table.back()->id;
@@ -73,8 +104,6 @@ void Content::PostFunCreateThread()
void Content::FunCreateThread()
{
FunCreateThreadCheckAccess();
TemplatesFunctions::thread_show_edit_subject_var = true; // !! tymczasowe rozwiazanie
}