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-2010, Tomasz Sowa
|
||||
@@ -134,5 +134,48 @@ char buf[20];
|
||||
}
|
||||
|
||||
|
||||
void winix_err_is(Info & i)
|
||||
{
|
||||
if( !i.is )
|
||||
return;
|
||||
|
||||
int value = atoi( i.is->c_str() );
|
||||
i.result = request.status == value;
|
||||
}
|
||||
|
||||
|
||||
void winix_err_code(Info & i)
|
||||
{
|
||||
i.out << request.status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static std::string winix_error_key;
|
||||
|
||||
|
||||
void winix_is_err_in_locales(Info & i)
|
||||
{
|
||||
char buff[40];
|
||||
|
||||
sprintf(buff, "winix_err_%d", request.status);
|
||||
winix_error_key = buff;
|
||||
|
||||
i.result = locale.IsKey(winix_error_key);
|
||||
}
|
||||
|
||||
|
||||
void winix_err_msg_from_locales(Info & i)
|
||||
{
|
||||
char buff[40];
|
||||
|
||||
sprintf(buff, "winix_err_%d", request.status);
|
||||
winix_error_key = buff;
|
||||
|
||||
i.out << locale.Get(winix_error_key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user