emacs didn't correctly report errors from db
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@639 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
b63ac98f40
commit
7bfed62526
|
@ -72,7 +72,7 @@ bool Emacs::PostEmacsCheckAbuse(bool adding)
|
|||
if( request->session->spam_score > 0 )
|
||||
{
|
||||
request->status = WINIX_ERR_SPAM;
|
||||
log << log1 << "Content: ignoring due to suspected spamming" << logend;
|
||||
log << log1 << "Emacs: ignoring due to suspected spamming" << logend;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,8 @@ void Emacs::PostFunEmacsModifyMountPoint(bool adding)
|
|||
|
||||
void Emacs::MakePost()
|
||||
{
|
||||
log << log1 << "1" << logend;
|
||||
|
||||
bool adding = !request->is_item;
|
||||
bool edit_with_url = functions->ReadItem(request->item, Item::file);
|
||||
|
||||
|
@ -115,29 +117,46 @@ void Emacs::MakePost()
|
|||
if( !PostEmacsCheckAbuse(adding) )
|
||||
return;
|
||||
|
||||
log << log1 << "2" << logend;
|
||||
|
||||
if( adding )
|
||||
{
|
||||
log << log1 << "3" << logend;
|
||||
|
||||
request->is_item = true;
|
||||
request->item.privileges = 0644; // !! tymczasowo, bedzie uzyte umask
|
||||
system->AddFile(request->item);
|
||||
request->status = system->AddFile(request->item);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "4" << logend;
|
||||
|
||||
|
||||
// !! moze dodac metode EditFile w klasie functions?
|
||||
// i ona wywola system->EditFile i poniszego updatera
|
||||
if( system->EditFile(request->item, edit_with_url) == WINIX_ERR_OK )
|
||||
log << request->item.id << logend;
|
||||
|
||||
request->status = system->EditFile(request->item, edit_with_url);
|
||||
|
||||
log << request->item.id << logend;
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
TemplatesFunctions::pattern_cacher.UpdatePattern(request->item);
|
||||
}
|
||||
|
||||
log << log1 << "5" << logend;
|
||||
|
||||
|
||||
if( request->status == WINIX_ERR_OK )
|
||||
{
|
||||
log << log1 << "6" << logend;
|
||||
|
||||
PostFunEmacsModifyMountPoint(adding);
|
||||
functions->CheckSpecialFile(request->item);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Content: PostFunEmacs: Error: "
|
||||
log << log1 << "Emacs: error: "
|
||||
<< request->status << logend;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue