diff --git a/install.php b/install.php
index ea0f19b..e10db49 100644
--- a/install.php
+++ b/install.php
@@ -1,5 +1,5 @@
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!");
}
diff --git a/jobs/check_db.php b/jobs/check_db.php
index 5284d37..74483d8 100644
--- a/jobs/check_db.php
+++ b/jobs/check_db.php
@@ -1,6 +1,6 @@
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) { }
diff --git a/jobs/db_ex_imp.php b/jobs/db_ex_imp.php
index 3e47148..6094c05 100644
--- a/jobs/db_ex_imp.php
+++ b/jobs/db_ex_imp.php
@@ -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();
diff --git a/jobs/server_usage.php b/jobs/server_usage.php
index 93ab144..ec48280 100644
--- a/jobs/server_usage.php
+++ b/jobs/server_usage.php
@@ -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] = '';
diff --git a/webinterface/_nav.php b/webinterface/_nav.php
index 7e64926..e37a94c 100644
--- a/webinterface/_nav.php
+++ b/webinterface/_nav.php
@@ -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 = "";
$err_msg = sprintf($lang['winav10'], $host,'!
', '
'); $err_lvl = 2;
}
diff --git a/webinterface/addon_assign_groups.php b/webinterface/addon_assign_groups.php
index f981229..313d2a0 100644
--- a/webinterface/addon_assign_groups.php
+++ b/webinterface/addon_assign_groups.php
@@ -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;
diff --git a/webinterface/export.php b/webinterface/export.php
index 1f7a34d..920da7d 100644
--- a/webinterface/export.php
+++ b/webinterface/export.php
@@ -44,7 +44,7 @@ function get_status($lang, $job_check, $check = NULL) {
$err_msg .= '
';
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 .= "
".sprintf($lang['wihladmex2'], "")."
".$cfg['teamspeak_query_pass'].""; } }