added: function adduser
changed: errors (removed enum, there are macros now) added: error messages to locales (winix_err_NN) removed: templates: err_abuse.html err_others.html git-svn-id: svn://ttmath.org/publicrep/winix/trunk@593 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* This file is a part of CMSLU -- Content Management System like Unix
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2009, Tomasz Sowa
|
||||
@@ -23,7 +23,7 @@ bool Content::FunUploadCheckAccess()
|
||||
{
|
||||
if( request.is_item || !request.CanUseUpload(*request.dir_table.back()) )
|
||||
{
|
||||
request.status = Error::permission_denied;
|
||||
request.status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ bool Content::UploadCreatePath(std::string & path)
|
||||
{
|
||||
if( !request.MakePath(path, true) )
|
||||
{
|
||||
request.status = Error::permission_denied;
|
||||
request.status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void Content::UploadSaveFile(const std::string & tmp_filename, const std::string
|
||||
log.SystemErr(err);
|
||||
log << logend;
|
||||
|
||||
request.status = Error::permission_denied;
|
||||
request.status = WINIX_ERR_PERMISSION_DENIED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ bool Content::FunUploadCheckAbuse()
|
||||
{
|
||||
if( !CheckRebus() )
|
||||
{
|
||||
request.status = Error::incorrect_rebus;
|
||||
request.status = WINIX_ERR_INCORRECT_REBUS;
|
||||
request.session->done = Done::added_thread;
|
||||
request.session->done_status = Error::incorrect_rebus;
|
||||
request.session->done_status = WINIX_ERR_INCORRECT_REBUS;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -83,9 +83,9 @@ bool Content::FunUploadCheckAbuse()
|
||||
|
||||
if( request.session->spam_score > 0 )
|
||||
{
|
||||
request.status = Error::spam;
|
||||
request.status = WINIX_ERR_SPAM;
|
||||
request.session->done = Done::added_thread;
|
||||
request.session->done_status = Error::spam;
|
||||
request.session->done_status = WINIX_ERR_SPAM;
|
||||
|
||||
log << log1 << "Content: ignoring due to suspected spamming" << logend;
|
||||
return false;
|
||||
@@ -123,7 +123,7 @@ void Content::UploadMulti()
|
||||
if( !UploadCreatePath(tmp_path) )
|
||||
return;
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
if( request.session->done_status == WINIX_ERR_OK )
|
||||
UploadSaveFile(i->second.tmp_filename, tmp_path);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ void Content::UploadSingle()
|
||||
PostFunEmacsAdd(); // always adding a new item
|
||||
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
if( request.session->done_status == WINIX_ERR_OK )
|
||||
{
|
||||
const std::string & tmp_filename = request.post_file_table.begin()->second.tmp_filename;
|
||||
|
||||
@@ -167,7 +167,7 @@ void Content::UploadSingle()
|
||||
}
|
||||
|
||||
|
||||
if( request.session->done_status == Error::ok )
|
||||
if( request.session->done_status == WINIX_ERR_OK )
|
||||
{
|
||||
if( !request.IsParam("ckeditor_upload") )
|
||||
RedirectTo(request.item);
|
||||
@@ -184,7 +184,7 @@ void Content::PostFunUpload()
|
||||
|
||||
if( request.post_file_table.empty() )
|
||||
{
|
||||
request.status = Error::permission_denied;
|
||||
request.status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user