diff --git a/src/classes/Controllers/Web/Servers.php b/src/classes/Controllers/Web/Servers.php index 9f4ce29..b608b91 100644 --- a/src/classes/Controllers/Web/Servers.php +++ b/src/classes/Controllers/Web/Servers.php @@ -56,6 +56,8 @@ class Servers extends BaseController $this->simplecache->set('dev_version', $dev_version); } + $rc_version = str_replace('-dev', '-rc', $dev_version); + $pager = new Pager($this->l10n, $request, 20); $stmt = 'SELECT * @@ -89,6 +91,7 @@ AND NOT `hidden`'; 'servers' => $servers, 'pager' => $pager->renderFull($count), 'stable_version' => $stable_version, + 'rc_version' => $rc_version, 'dev_version' => $dev_version, ]; diff --git a/src/classes/Controllers/Web/Statistics.php b/src/classes/Controllers/Web/Statistics.php index f49fe5b..865c9ef 100644 --- a/src/classes/Controllers/Web/Statistics.php +++ b/src/classes/Controllers/Web/Statistics.php @@ -65,6 +65,8 @@ class Statistics extends BaseController $this->simplecache->set('dev_version', $dev_version); } + $rc_version = str_replace('-dev', '-rc', $dev_version); + $serverPollQueueCount = $this->connection->fetchValue('SELECT COUNT(*) FROM `server_poll_queue`'); $serverCounts = $this->connection->fetchOne( @@ -74,11 +76,11 @@ class Statistics extends BaseController SUM(CASE WHEN `available` AND `language` IS NOT NULL THEN 1 ELSE 0 END) AS `language`, SUM(CASE WHEN `available` AND `reg_policy` = "REGISTER_OPEN" THEN 1 ELSE 0 END) AS `open`, SUM(CASE WHEN `available` AND `version` IS NOT NULL THEN 1 ELSE 0 END) AS `version`, - SUM(CASE WHEN `available` AND `version` = :dev_version THEN 1 ELSE 0 END) AS `dev_version`, + SUM(CASE WHEN `available` AND (`version` = :dev_version OR `version` = :rc_version) THEN 1 ELSE 0 END) AS `dev_version`, SUM(CASE WHEN `available` AND `version` = :stable_version THEN 1 ELSE 0 END) AS `stable_version`, - SUM(CASE WHEN `available` AND `version` != :dev_version AND `version` != :stable_version THEN 1 ELSE 0 END) AS `outdated_version` + SUM(CASE WHEN `available` AND `version` != :dev_version AND `version` != :stable_version AND `version` != :rc_version THEN 1 ELSE 0 END) AS `outdated_version` FROM `server` - WHERE NOT `hidden`', ['dev_version' => $dev_version, 'stable_version' => $stable_version]); + WHERE NOT `hidden`', ['dev_version' => $dev_version, 'rc_version' => $rc_version, 'stable_version' => $stable_version]); $stmt = 'SELECT LEFT(`language`, 2) AS `language`, COUNT(*) AS `total`, COUNT(*) / :total AS `ratio` FROM `server` @@ -145,6 +147,7 @@ class Statistics extends BaseController ], ], 'dev_version' => $dev_version, + 'rc_version' => $rc_version, 'stable_version' => $stable_version, ]; diff --git a/src/classes/Pollers/Server.php b/src/classes/Pollers/Server.php index 1b96264..d5de2fc 100644 --- a/src/classes/Pollers/Server.php +++ b/src/classes/Pollers/Server.php @@ -365,8 +365,10 @@ class Server $this->simplecache->set('dev_version', $dev_version); } - if ($version == $dev_version) { - $max_health = 95; //Develop can be unstable + $rc_version = str_replace('-dev', '-rc', $dev_version); + + if ($version == $dev_version || $version == $rc_version) { + $max_health = 95; //Develop/RC can be unstable } elseif ($version !== $stable_version) { $delta = min($delta, 0) - 10; // Losing score as time passes if node isn't updated } diff --git a/src/templates/servers.phtml b/src/templates/servers.phtml index eba98f3..5f0de89 100644 --- a/src/templates/servers.phtml +++ b/src/templates/servers.phtml @@ -5,7 +5,7 @@