mirror of
https://github.com/slawkens/myaac.git
synced 2025-11-27 21:56:50 +01: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:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// change monsters.file_path field to loot
|
||||
if(fieldExist('file_path', TABLE_PREFIX . 'monsters')) {
|
||||
if($db->hasColumn(TABLE_PREFIX . 'monsters', 'file_path')) {
|
||||
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` CHANGE `file_path` `loot` VARCHAR(5000);");
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ $db->query("UPDATE `" . TABLE_PREFIX . "monsters` SET `loot` = '';");
|
||||
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` DROP COLUMN `gfx_name`;");
|
||||
|
||||
// rename hide_creature to hidden
|
||||
if(fieldExist('hide_creature', TABLE_PREFIX . 'monsters')) {
|
||||
if($db->hasColumn(TABLE_PREFIX . 'monsters', 'hide_creature')) {
|
||||
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` CHANGE `hide_creature` `hidden` TINYINT(1) NOT NULL DEFAULT 0;");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user