mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 01:09:21 +02:00

* changed tableExist and fieldExist to $db->hasTable(table) + $db->hasColumn(table, column) * new configurable: database_log - can log database queries and show in website source when logged as super admin * removed debug_level configurable, enabled by default when logged on super admin * added OTS_Account:getCountry() * added posibility to load OTS_Player partially, and without skills * (internal) changed depracated $ots->createObject() functions with their OTS_ equivalents * (internal) removed unused code
75 lines
1.4 KiB
PHP
75 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Deprecated functions (compat)
|
|
*
|
|
* @package MyAAC
|
|
* @author Slawkens <slawkens@gmail.com>
|
|
* @copyright 2017 MyAAC
|
|
* @link http://my-aac.org
|
|
*/
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
|
|
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;
|
|
}
|
|
|
|
function news_place() {
|
|
return tickers();
|
|
}
|
|
|
|
function tableExist($table)
|
|
{
|
|
global $db;
|
|
return $db->hasTable($table);
|
|
}
|
|
|
|
function fieldExist($field, $table)
|
|
{
|
|
global $db;
|
|
return $db->hasColumn($table, $field);
|
|
}
|
|
?>
|