From da6ecc50178f51d4fefe9730d88d4aa88f90dba4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 13 Oct 2017 15:13:38 +0200 Subject: [dnbd3] Implement settings dialog for automatic proxies --- modules-available/dnbd3/inc/dnbd3util.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules-available/dnbd3/inc/dnbd3util.inc.php') diff --git a/modules-available/dnbd3/inc/dnbd3util.inc.php b/modules-available/dnbd3/inc/dnbd3util.inc.php index ae5e0cd7..03499413 100644 --- a/modules-available/dnbd3/inc/dnbd3util.inc.php +++ b/modules-available/dnbd3/inc/dnbd3util.inc.php @@ -38,7 +38,7 @@ class Dnbd3Util { array('machineuuid' => $client['machineuuid'])); // Missing from $servers now but we'll handle them in the next run, so don't bother } - // Same for this server - we use the special fixedip '' for it and need to prevent we don't have the + // Same for this server - we use the special fixedip '' for it and need to make surecx we don't have the // IP address of the server itself in the list. Database::exec('DELETE FROM dnbd3_server WHERE fixedip = :serverip', array('serverip' => $satServerIp)); Database::exec("INSERT IGNORE INTO dnbd3_server (fixedip) VALUES ('')"); @@ -93,7 +93,8 @@ class Dnbd3Util { while ($row = $res->fetch(PDO::FETCH_ASSOC)) { $assignedLocs[] = $row['locationid']; } - if (!empty($assignedLocs)) { + $modeData = (array)json_decode($modeData, true); + if (!empty($assignedLocs) && isset($modeData['firewall']) && $modeData['firewall']) { // Get all sub-locations too $recursiveLocs = $assignedLocs; $locations = Location::getLocationsAssoc(); @@ -140,6 +141,10 @@ class Dnbd3Util { if (!empty($private)) { ConfigHolder::add('SLX_DNBD3_PRIVATE', implode(' ', $private)); } + if (isset($modeData['bgr']) && $modeData['bgr']) { + // Background replication + ConfigHolder::add('SLX_DNBD3_BGR', '1'); + } ConfigHolder::add('SLX_ADDONS', '', 1000); ConfigHolder::add('SLX_SHUTDOWN_TIMEOUT', '', 1000); ConfigHolder::add('SLX_SHUTDOWN_SCHEDULE', '', 1000); -- cgit v1.2.3-55-g7522