mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-09-20 23:06:10 +08:00
improve/fix some things
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
d385d43af0
commit
172ae49cdf
|
@ -306,7 +306,13 @@
|
|||
"3310"
|
||||
],
|
||||
"environmentVariables": [],
|
||||
"volumes": [],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "nextcloud_aio_clamav",
|
||||
"location": "/var/lib/clamav",
|
||||
"writeable": true
|
||||
}
|
||||
],
|
||||
"secrets": [],
|
||||
"maxShutdownTime": 10,
|
||||
"restartPolicy": "unless-stopped"
|
||||
|
|
|
@ -18,19 +18,21 @@
|
|||
<MissingParamType occurrences="1">
|
||||
<code>$args</code>
|
||||
</MissingParamType>
|
||||
<PossiblyInvalidArrayAccess occurrences="3">
|
||||
<PossiblyInvalidArrayAccess occurrences="4">
|
||||
<code>$request->getParsedBody()['borg_backup_host_location']</code>
|
||||
<code>$request->getParsedBody()['domain']</code>
|
||||
<code>$request->getParsedBody()['clamav']</code>
|
||||
<code>$request->getParsedBody()['options-form']</code>
|
||||
</PossiblyInvalidArrayAccess>
|
||||
<PossiblyNullArgument occurrences="2">
|
||||
<code>$request->getParsedBody()['borg_backup_host_location']</code>
|
||||
<code>$request->getParsedBody()['domain']</code>
|
||||
</PossiblyNullArgument>
|
||||
<PossiblyNullArrayAccess occurrences="3">
|
||||
<PossiblyNullArrayAccess occurrences="4">
|
||||
<code>$request->getParsedBody()['borg_backup_host_location']</code>
|
||||
<code>$request->getParsedBody()['domain']</code>
|
||||
<code>$request->getParsedBody()['clamav']</code>
|
||||
<code>$request->getParsedBody()['options-form']</code>
|
||||
</PossiblyNullArrayAccess>
|
||||
</file>
|
||||
<file src="src/Controller/DockerController.php">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
// Clamav
|
||||
document.getElementById("clamav").disabled = true;
|
||||
var clamav = document.getElementById("clamav");
|
||||
clamav.disabled = true;
|
||||
});
|
|
@ -35,14 +35,11 @@ class ConfigurationController
|
|||
$this->configurationManager->SetBorgBackupHostLocation($request->getParsedBody()['borg_backup_host_location']);
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['clamav'])) {
|
||||
$value = $request->getParsedBody()['clamav'];
|
||||
if ($value === 'on') {
|
||||
if (isset($request->getParsedBody()['options-form'])) {
|
||||
if (isset($request->getParsedBody()['clamav'])) {
|
||||
$this->configurationManager->SetClamavEnabledState(1);
|
||||
} elseif ($value === 'off') {
|
||||
$this->configurationManager->SetClamavEnabledState(0);
|
||||
} else {
|
||||
error_log('It seems like clamav was changed but not to on or off.');
|
||||
$this->configurationManager->SetClamavEnabledState(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,15 +293,16 @@
|
|||
<form id="options-form" method="POST" action="/api/configuration" class="xhr">
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input type="hidden" name="options-form" value="options-form">
|
||||
{% if is_clamav_enabled == true %}
|
||||
<input type="checkbox" id="clamav" name="clamav" checked="checked"><label for="clamav">ClamAV (only supported on x64)</label>
|
||||
<input type="checkbox" id="clamav" name="clamav" checked="checked"><label for="clamav">ClamAV (only supported on x64, needs ~2GB additional RAM)</label>
|
||||
{% else %}
|
||||
<input type="checkbox" id="clamav" name="clamav"><label for="clamav">ClamAV (only supported on x64)</label>
|
||||
<input type="checkbox" id="clamav" name="clamav"><label for="clamav">ClamAV (only supported on x64, needs ~2GB additional RAM)</label>
|
||||
{% endif %}
|
||||
<input id="options-form-submit" class="button" type="submit" value="Save changes" />
|
||||
</form>
|
||||
{% if isAnyRunning == true or is_x64_platform == false %}
|
||||
<script type="text/javascript" src="disabe-clamav.js"></script>
|
||||
<script type="text/javascript" src="disable-clamav.js"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue