mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00
* cache $db->hasTable and $db->hasColumn functions
* 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
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
|
||||
/** HOUSE **/
|
||||
$town = 'town';
|
||||
if(fieldExist('town_id', 'houses'))
|
||||
if($db->hasColumn('houses', 'town_id'))
|
||||
$town = 'town_id';
|
||||
|
||||
$house = $db->query( 'SELECT `houses`.`name`, `houses`.`' . $town . '` as town FROM `houses` WHERE `houses`.`owner` = '.$player->getId().';' )->fetchAll();
|
||||
|
@@ -101,7 +101,7 @@
|
||||
imagefilledrectangle($img, 225, 40, 225, 130, $title); //seperator
|
||||
$posy = 50;
|
||||
|
||||
if(fieldExist('skill_fist', 'players')) {// tfs 1.0+
|
||||
if($db->hasColumn('players', 'skill_fist')) {// tfs 1.0+
|
||||
$skills_db = $db->query('SELECT `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch();
|
||||
|
||||
$skill_ids = array(
|
||||
|
Reference in New Issue
Block a user