mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-14 17:50:21 +00:00
Make restoreExcludePreviews an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
3656d181a5
commit
79d6458a72
3 changed files with 7 additions and 16 deletions
|
|
@ -124,12 +124,8 @@ 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->SetBackupMode('restore');
|
$this->configurationManager->SetBackupMode('restore');
|
||||||
if (isset($request->getParsedBody()['restore-exclude-previews'])) {
|
|
||||||
$config['restore-exclude-previews'] = 1;
|
|
||||||
} else {
|
|
||||||
$config['restore-exclude-previews'] = '';
|
|
||||||
}
|
|
||||||
$this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
$this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||||
|
$this->configurationManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']);
|
||||||
|
|
||||||
$id = self::TOP_CONTAINER;
|
$id = self::TOP_CONTAINER;
|
||||||
$forceStopNextcloud = true;
|
$forceStopNextcloud = true;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ class ConfigurationManager
|
||||||
set { $this->set('password', $value); }
|
set { $this->set('password', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool $restoreExcludePreviews {
|
||||||
|
get => $this->get('restore-exclude-previews', false);
|
||||||
|
set { $this->set('restore-exclude-previews', $value); }
|
||||||
|
}
|
||||||
|
|
||||||
public string $selectedRestoreTime {
|
public string $selectedRestoreTime {
|
||||||
get => $this->get('selected-restore-time', '');
|
get => $this->get('selected-restore-time', '');
|
||||||
set { $this->set('selected-restore-time', $value); }
|
set { $this->set('selected-restore-time', $value); }
|
||||||
|
|
@ -472,15 +477,6 @@ class ConfigurationManager
|
||||||
$this->WriteConfig($config);
|
$this->WriteConfig($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetRestoreExcludePreviews() : string {
|
|
||||||
$config = $this->GetConfig();
|
|
||||||
if(!isset($config['restore-exclude-previews'])) {
|
|
||||||
$config['restore-exclude-previews'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $config['restore-exclude-previews'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -548,8 +548,7 @@ readonly class DockerActionManager {
|
||||||
'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(),
|
'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(),
|
||||||
'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(),
|
'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(),
|
||||||
'AIO_URL' => $this->configurationManager->AIO_URL,
|
'AIO_URL' => $this->configurationManager->AIO_URL,
|
||||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(),
|
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '',
|
||||||
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(),
|
|
||||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
||||||
'APACHE_PORT' => $this->configurationManager->GetApachePort(),
|
'APACHE_PORT' => $this->configurationManager->GetApachePort(),
|
||||||
'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(),
|
'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue