summaryrefslogtreecommitdiffstats
path: root/modules-available/dnbd3
diff options
context:
space:
mode:
authorSimon Rettberg2022-06-09 12:16:53 +0200
committerSimon Rettberg2022-06-09 12:16:53 +0200
commitc607a2a16338b427d1026da27dcf25dbd64dd540 (patch)
treecefdf4bdf7281dc87bf411b855039e3fe6b65241 /modules-available/dnbd3
parent[remoteaccess] Track unwakable machines, ignore restricted locations (diff)
downloadslx-admin-c607a2a16338b427d1026da27dcf25dbd64dd540.tar.gz
slx-admin-c607a2a16338b427d1026da27dcf25dbd64dd540.tar.xz
slx-admin-c607a2a16338b427d1026da27dcf25dbd64dd540.zip
[dnbd3] Allow overriding dnbd3.sparseFiles
Diffstat (limited to 'modules-available/dnbd3')
-rw-r--r--modules-available/dnbd3/page.inc.php3
-rw-r--r--modules-available/dnbd3/templates/fragment-server-settings.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/dnbd3/page.inc.php b/modules-available/dnbd3/page.inc.php
index e90eff0f..a373d0ed 100644
--- a/modules-available/dnbd3/page.inc.php
+++ b/modules-available/dnbd3/page.inc.php
@@ -68,7 +68,7 @@ class Page_Dnbd3 extends Page
}
$advancedSettings = [];
foreach (Request::post('extra', [], 'array') as $name => $value) {
- $value = preg_replace('/[^0-9KMGTmhdBb]/', '', $value);
+ $value = preg_replace('/[^0-9KMGTmhdBbtruefals]/', '', $value);
if ($value === '')
continue;
$advancedSettings[$name] = $value;
@@ -549,6 +549,7 @@ class Page_Dnbd3 extends Page
'dnbd3.bgrMinClients',
'dnbd3.bgrWindowSize',
'dnbd3.autoFreeDiskSpaceDelay',
+ 'dnbd3.sparseFiles',
'limits.maxClients',
'limits.maxImages',
'limits.maxPayload',
diff --git a/modules-available/dnbd3/templates/fragment-server-settings.html b/modules-available/dnbd3/templates/fragment-server-settings.html
index 316b883c..794c5fd9 100644
--- a/modules-available/dnbd3/templates/fragment-server-settings.html
+++ b/modules-available/dnbd3/templates/fragment-server-settings.html
@@ -33,7 +33,7 @@
<label for="ex-{{name}}">{{name}}</label>
</div>
<div class="col-sm-4">
- <input id="ex-{{name}}" class="form-control" type="text" pattern="[0-9]*[KMGTmhd]?[Bb]?" value="{{value}}"
+ <input id="ex-{{name}}" class="form-control" type="text" pattern="[0-9KMGTmhdtruefals]*" value="{{value}}"
name="extra[{{name}}]">
</div>
</div>