summaryrefslogtreecommitdiffstats
path: root/modules-available/dnbd3/inc/dnbd3util.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-10-13 15:13:38 +0200
committerSimon Rettberg2017-10-13 15:13:38 +0200
commitda6ecc50178f51d4fefe9730d88d4aa88f90dba4 (patch)
tree8d6dfa82d8d2926645b34aa3e5bc2be5265c1255 /modules-available/dnbd3/inc/dnbd3util.inc.php
parent[dnbd3] Show free space, fix styling, add help texts and strings (de) (diff)
downloadslx-admin-da6ecc50178f51d4fefe9730d88d4aa88f90dba4.tar.gz
slx-admin-da6ecc50178f51d4fefe9730d88d4aa88f90dba4.tar.xz
slx-admin-da6ecc50178f51d4fefe9730d88d4aa88f90dba4.zip
[dnbd3] Implement settings dialog for automatic proxies
Diffstat (limited to 'modules-available/dnbd3/inc/dnbd3util.inc.php')
-rw-r--r--modules-available/dnbd3/inc/dnbd3util.inc.php9
1 files changed, 7 insertions, 2 deletions
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 '<self>' for it and need to prevent we don't have the
+ // Same for this server - we use the special fixedip '<self>' 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 ('<self>')");
@@ -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);