Skip to content

Commit

Permalink
release 1.3.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Newcomer1989 committed Dec 20, 2020
1 parent 5961fb9 commit cf8b029
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?PHP
$rsversion = '1.3.14';
$rsversion = '1.3.15';

require_once('other/_functions.php');
require_once('other/config.php');
Expand Down
2 changes: 1 addition & 1 deletion jobs/bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function run_bot(&$cfg) {
enter_logfile($cfg,2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
}

if(version_compare($ts3version['version'],'3.12.9','<=') && version_compare($ts3version['version'],'3.0.0','>=')) {
if(version_compare($ts3version['version'],'3.13.2','<=') && version_compare($ts3version['version'],'3.0.0','>=')) {
enter_logfile($cfg,3," Your TS3 server is outdated, please update it!");
}

Expand Down
14 changes: 8 additions & 6 deletions jobs/check_db.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?PHP
function check_db($mysqlcon,$lang,&$cfg,$dbname) {
$cfg['version_latest_available'] = '1.3.14';
$cfg['version_latest_available'] = '1.3.15';
enter_logfile($cfg,5,"Check Ranksystem database for updates...");

function check_double_cldbid($mysqlcon,$cfg,$dbname) {
Expand Down Expand Up @@ -394,16 +394,18 @@ function check_writable($cfg,$mysqlcon) {
}

if(version_compare($cfg['version_current_using'], '1.3.14', '<')) {
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`;") === false) { }
if($mysqlcon->exec("DELETE FROM `$dbname`.`addon_assign_groups`;") === false) { }

if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('stats_column_default_sort_2', 'rank'),('stats_column_default_order_2', 'asc') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);") === false) { } else {
enter_logfile($cfg,4," [1.3.14] Added new cfg_params values.");
enter_logfile($cfg,4," [1.3.13] Added new cfg_params values.");
}

if($mysqlcon->exec("INSERT IGNORE INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_name','');") === false) { } else {
enter_logfile($cfg,4," [1.3.14] Added new addons_config values.");
enter_logfile($cfg,4," [1.3.13] Added new addons_config values.");
}
}

if(version_compare($cfg['version_current_using'], '1.3.15', '<')) {
if($mysqlcon->exec("DELETE FROM `$dbname`.`admin_addtime`;") === false) { }
if($mysqlcon->exec("DELETE FROM `$dbname`.`addon_assign_groups`;") === false) { }

try {
if($mysqlcon->exec("CREATE INDEX `serverusage_timestamp` ON `$dbname`.`server_usage` (`timestamp`)") === false) { }
Expand Down
2 changes: 1 addition & 1 deletion jobs/db_ex_imp.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function db_ex_imp($ts3,$mysqlcon,$lang,$cfg,$dbname,&$db_cache) {
enter_logfile($cfg,2," Cannot create $filepath.sql.zip!");
} else {
$zip->addFile($filepath.".sql",$filename.".sql");
if(version_compare(phpversion(), '7.2', '>=')) {
if(version_compare(phpversion(), '7.2', '>=') && version_compare(phpversion("zip"), '1.2.0', '>=')) {
$zip->setEncryptionName($filename.".sql", ZipArchive::EM_AES_256, $cfg['teamspeak_query_pass']);
}
$zip->close();
Expand Down
2 changes: 1 addition & 1 deletion jobs/server_usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function server_usage($mysqlcon,$cfg,$dbname,$serverinfo,&$db_cache) {
$sqlexec = '';

// Stats for Server Usage
if(key($db_cache['max_timestamp_server_usage']) == 0 || ($nowtime - key($db_cache['max_timestamp_server_usage'])) > 898) { // every 15 mins
if(key($db_cache['max_timestamp_server_usage']) === '' || ($nowtime - key($db_cache['max_timestamp_server_usage'])) > 898) { // every 15 mins
unset($db_cache['max_timestamp_server_usage']);
$db_cache['max_timestamp_server_usage'][$nowtime] = '';

Expand Down
2 changes: 1 addition & 1 deletion webinterface/_nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
$err_msg = $lang['winav11']; $err_lvl = 2;
}

if(!isset($_SERVER['HTTPS']) && !isset($err_msg) || isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on" && !isset($err_msg)) {
if((!isset($_SERVER['HTTPS']) || isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on") && !isset($err_msg) && basename($_SERVER['SCRIPT_NAME']) == "index.php") {
$host = "<a href=\"https://".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."\">";
$err_msg = sprintf($lang['winav10'], $host,'</a>!<br>', '<br>'); $err_lvl = 2;
}
Expand Down
2 changes: 1 addition & 1 deletion webinterface/addon_assign_groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
$alwgr = substr($alwgr,0,-1);
$excgr = substr($excgr,0,-1);

if(!isset($err_lvl)) {
if(!isset($err_lvl) || $err_lvl < 3) {
if ($mysqlcon->exec("INSERT INTO `$dbname`.`addons_config` (`param`,`value`) VALUES ('assign_groups_name','{$name}'), ('assign_groups_active','{$assign_groups_active}'), ('assign_groups_limit','{$limit}'), ('assign_groups_groupids','{$alwgr}'), ('assign_groups_excepted_groupids','{$excgr}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`); DELETE FROM `$dbname`.`csrf_token` WHERE `token`='{$_POST['csrf_token']}") === false) {
$err_msg = print_r($mysqlcon->errorInfo(), true);
$err_lvl = 3;
Expand Down
2 changes: 1 addition & 1 deletion webinterface/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function get_status($lang, $job_check, $check = NULL) {
$err_msg .= '</pre><br>';
if($job_check['database_export']['timestamp'] == 4) {
$err_msg .= "Exported file successfully.";
if(version_compare(phpversion(), '7.2', '>=')) {
if(version_compare(phpversion(), '7.2', '>=') && version_compare(phpversion("zip"), '1.2.0', '>=')) {
$err_msg .= "<br><u>".sprintf($lang['wihladmex2'], "</u>")."<br><pre>".$cfg['teamspeak_query_pass']."</pre>";
}
}
Expand Down

0 comments on commit cf8b029

Please sign in to comment.