mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Set multiple attributes at once
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
c997332e47
commit
9c9ad02f8a
1 changed files with 16 additions and 11 deletions
|
|
@ -123,9 +123,11 @@ readonly class DockerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
|
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
|
||||||
$this->configurationManager->backupMode = 'restore';
|
$this->configurationManager->setMultiple(function ($confManager) use ($request) {
|
||||||
$this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
$confManager->backupMode = 'restore';
|
||||||
$this->configurationManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']);
|
$confManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||||
|
$confManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']);
|
||||||
|
});
|
||||||
|
|
||||||
$id = self::TOP_CONTAINER;
|
$id = self::TOP_CONTAINER;
|
||||||
$forceStopNextcloud = true;
|
$forceStopNextcloud = true;
|
||||||
|
|
@ -150,8 +152,10 @@ readonly class DockerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response {
|
public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response {
|
||||||
$this->configurationManager->backupMode = 'test';
|
$this->configurationManager->setMultiple(function ($confManager) {
|
||||||
$this->configurationManager->instance_restore_attempt = false;
|
$confManager->backupMode = 'test';
|
||||||
|
$confManager->instance_restore_attempt = false;
|
||||||
|
});
|
||||||
|
|
||||||
$id = self::TOP_CONTAINER;
|
$id = self::TOP_CONTAINER;
|
||||||
$this->PerformRecursiveContainerStop($id);
|
$this->PerformRecursiveContainerStop($id);
|
||||||
|
|
@ -173,12 +177,13 @@ readonly class DockerController {
|
||||||
$port = 443;
|
$port = 443;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->configurationManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']);
|
$this->configurationManager->setMultiple(function ($confManager) use ($request, $host, $port, $path) {
|
||||||
// set AIO_URL
|
$confManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']);
|
||||||
$this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path;
|
// set AIO_URL
|
||||||
// set wasStartButtonClicked
|
$confManager->AIO_URL = $host . ':' . (string)$port . $path;
|
||||||
$this->configurationManager->wasStartButtonClicked = true;
|
// set wasStartButtonClicked
|
||||||
|
$confManager->wasStartButtonClicked = true;
|
||||||
|
});
|
||||||
// Do not pull container images in case 'bypass_container_update' is set via url params
|
// Do not pull container images in case 'bypass_container_update' is set via url params
|
||||||
// Needed for local testing
|
// Needed for local testing
|
||||||
$pullImage = !isset($request->getParsedBody()['bypass_container_update']);
|
$pullImage = !isset($request->getParsedBody()['bypass_container_update']);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue