diff --git a/src/installer/pages/2.php b/src/installer/pages/2.php
index dbaba61..2fa9caf 100644
--- a/src/installer/pages/2.php
+++ b/src/installer/pages/2.php
@@ -51,14 +51,6 @@ if(!empty($_POST["allow-metrics-checkbox"])) {
-
-
-
- You are using PHP 5.6 which will not be supported in the future. Please upgrade.
-
-
-
-
Success! Looks like you can run TS-website 2.0!
@@ -92,10 +84,10 @@ function checkRequirements() {
// PHP version - 5.6.0 minimum, < 7 warning, > 7 ok
{
- $result = PHP_VERSION_ID < 50600 ? 2 : (PHP_VERSION_ID < 70000 ? 1 : 0);
+ $result = PHP_VERSION_ID < 70200 ? 2 : 0;
showCheckResult(
- "PHP 5.6.0+ (7.0+ required soon)",
+ "PHP 7.2.0+",
$result,
"Current PHP version: " . phpversion()
);
@@ -114,21 +106,6 @@ function checkRequirements() {
);
}
- // password_hash and password_verify
- {
- $result = PHP_VERSION_ID >= 50500 && password_verify(
- "ayy-lmao-m88", password_hash("ayy-lmao-m88", PASSWORD_DEFAULT)
- );
-
- showCheckResult(
- "password_hash & password_verify",
- $result ? 0 : 2,
- $result ?
- "Functions exists and work" :
- "Please make sure your PHP version supports BCRYPT and BLOWFISH"
- );
- }
-
displayCategory("Extension checks");
// Extensions check
diff --git a/src/installer/pages/4.php b/src/installer/pages/4.php
index 71cd6ac..50ff2db 100644
--- a/src/installer/pages/4.php
+++ b/src/installer/pages/4.php
@@ -25,28 +25,36 @@ if (!empty($_POST)) {
$tsServer = $tsNodeHost->serverGetByPort($queryserverport);
if(is_array($tsServer->getInfo())) {
- $utils = Config::i();
+ $tsVersion = $tsServer->getInfo()["virtualserver_version"];
+ $tsBuildNo = $tsVersion->section("[", 1)->filterDigits()->toInt();
- $configdata = [
- "query_hostname" => $queryhostname,
- "query_port" => $queryport,
- "tsserver_port" => $queryserverport,
- "query_username" => $queryusername,
- "query_password" => $querypassword,
- "query_displayip" => $querydisplayip,
- ];
+ if ($tsBuildNo < 1564054246) {
+ $errormessage =
+ 'Your TeamSpeak server version is not supported.
' .
+ 'Current version: ' . TeamSpeak3_Helper_Convert::versionShort($tsVersion) . ' (build ' . $tsBuildNo . ')' . '
' .
+ 'Supported versions: 3.10.0 (build 1564054246) and newer';
+ } else {
+ $configdata = [
+ "query_hostname" => $queryhostname,
+ "query_port" => $queryport,
+ "tsserver_port" => $queryserverport,
+ "query_username" => $queryusername,
+ "query_password" => $querypassword,
+ "query_displayip" => $querydisplayip,
+ ];
- foreach ($configdata as $key => $value) {
- try {
- $utils->setValue($key, $value);
- } catch (\Exception $e) {
- die("Error while updating config in database, at " . htmlspecialchars($key) . " => " . htmlspecialchars($value));
+ foreach ($configdata as $key => $value) {
+ try {
+ Config::i()->setValue($key, $value);
+ } catch (\Exception $e) {
+ die("Error while updating config in database, at " . htmlspecialchars($key) . " => " . htmlspecialchars($value));
+ }
}
- }
- $cacheIcons = true;
+ $cacheIcons = true;
+ }
} else {
- $errormessage .= '
Cannot retrieve server information';
+ $errormessage = 'Cannot retrieve server information';
}
} catch (Exception $e) {
$errormessage = htmlspecialchars("Error " . $e->getCode() . ": " . $e->getMessage());