mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
* added some compat functions that are used by shop system
This commit is contained in:
parent
bf988a7f6e
commit
195ec4b11e
@ -976,4 +976,52 @@ function unsetSession($key) {
|
||||
|
||||
// validator functions
|
||||
require_once(LIBS . 'validator.php');
|
||||
|
||||
function check_name($name, &$errors = '') {
|
||||
if(Validator::characterName($name))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_account_id($id, &$errors = '') {
|
||||
if(Validator::accountId($id))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_account_name($name, &$errors = '') {
|
||||
if(Validator::accountName($name))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_name_new_char($name, &$errors = '') {
|
||||
if(Validator::newCharacterName($name))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_rank_name($name, &$errors = '') {
|
||||
if(Validator::rankName($name))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
|
||||
function check_guild_name($name, &$errors = '') {
|
||||
if(Validator::guildName($name))
|
||||
return true;
|
||||
|
||||
$errors = Validator::getLastError();
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user