mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
allow to exclude previews from restore upon instance restore
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
9b3b153d13
commit
47e0ac7b4d
7 changed files with 39 additions and 1 deletions
|
|
@ -113,6 +113,11 @@ readonly class DockerController {
|
|||
$config = $this->configurationManager->GetConfig();
|
||||
$config['backup-mode'] = 'restore';
|
||||
$config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||
if (isset($request->getParsedBody()['restore-exclude-previews'])) {
|
||||
$config['restore-exclude-previews'] = 1;
|
||||
} else {
|
||||
$config['restore-exclude-previews'] = '';
|
||||
}
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
|
||||
$id = self::TOP_CONTAINER;
|
||||
|
|
|
|||
|
|
@ -427,6 +427,15 @@ class ConfigurationManager
|
|||
return $config['selected-restore-time'];
|
||||
}
|
||||
|
||||
public function GetRestoreExcludePreviews() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['restore-exclude-previews'])) {
|
||||
$config['restore-exclude-previews'] = '';
|
||||
}
|
||||
|
||||
return $config['restore-exclude-previews'];
|
||||
}
|
||||
|
||||
public function GetAIOURL() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['AIO_URL'])) {
|
||||
|
|
|
|||
|
|
@ -273,6 +273,8 @@ readonly class DockerActionManager {
|
|||
$replacements[1] = $this->configurationManager->GetAIOURL();
|
||||
} elseif ($out[1] === 'SELECTED_RESTORE_TIME') {
|
||||
$replacements[1] = $this->configurationManager->GetSelectedRestoreTime();
|
||||
} elseif ($out[1] === 'RESTORE_EXCLUDE_PREVIEWS') {
|
||||
$replacements[1] = $this->configurationManager->GetRestoreExcludePreviews();
|
||||
} elseif ($out[1] === 'APACHE_PORT') {
|
||||
$replacements[1] = $this->configurationManager->GetApachePort();
|
||||
} elseif ($out[1] === 'TALK_PORT') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue