mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Make selectedRestoreTime an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
1d11a4682b
commit
b8130958c5
3 changed files with 7 additions and 12 deletions
|
|
@ -124,14 +124,12 @@ readonly class DockerController {
|
|||
|
||||
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
|
||||
$this->configurationManager->SetBackupMode('restore');
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
$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);
|
||||
$this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||
|
||||
$id = self::TOP_CONTAINER;
|
||||
$forceStopNextcloud = true;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ class ConfigurationManager
|
|||
set { $this->set('password', $value); }
|
||||
}
|
||||
|
||||
public string $selectedRestoreTime {
|
||||
get => $this->get('selected-restore-time', '');
|
||||
set { $this->set('selected-restore-time', $value); }
|
||||
}
|
||||
|
||||
public string $AIO_URL {
|
||||
get => $this->get('AIO_URL', '');
|
||||
set { $this->set('AIO_URL', $value); }
|
||||
|
|
@ -467,15 +472,6 @@ class ConfigurationManager
|
|||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function GetSelectedRestoreTime() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['selected-restore-time'])) {
|
||||
$config['selected-restore-time'] = '';
|
||||
}
|
||||
|
||||
return $config['selected-restore-time'];
|
||||
}
|
||||
|
||||
public function GetRestoreExcludePreviews() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['restore-exclude-previews'])) {
|
||||
|
|
|
|||
|
|
@ -565,6 +565,7 @@ readonly class DockerActionManager {
|
|||
'AIO_URL' => $this->configurationManager->AIO_URL,
|
||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(),
|
||||
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(),
|
||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
|
||||
'APACHE_PORT' => $this->configurationManager->GetApachePort(),
|
||||
'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(),
|
||||
'TALK_PORT' => $this->configurationManager->GetTalkPort(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue