* 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:
slawkens1
2018-01-06 05:44:33 +01:00
parent 31537687c1
commit 1025fad0e6
65 changed files with 446 additions and 417 deletions

View File

@@ -13,7 +13,7 @@ $title = 'Polls';
/* Polls System By Averatec from pervera.pl & otland.net */
if(!tableExist('z_polls'))
if(!$db->hasTable('z_polls'))
$db->query('
CREATE TABLE `z_polls` (
`id` int(11) NOT NULL auto_increment,
@@ -26,7 +26,7 @@ CREATE TABLE `z_polls` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;');
if(!tableExist('z_polls_answers'))
if(!$db->hasTable('z_polls_answers'))
$db->query('
CREATE TABLE `z_polls_answers` (
`poll_id` int(11) NOT NULL,
@@ -35,7 +35,7 @@ $db->query('
`votes` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;');
if(!fieldExist('vote', 'accounts'))
if(!$db->hasColumn('accounts', 'vote'))
$db->query('ALTER TABLE `accounts` ADD `vote` INT( 11 ) NOT NULL ;');
function getColorByPercent($percent)