mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-14 09:40:15 +00:00
Make selectedRestoreTime an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
c608009981
commit
0c20e2b2f9
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 {
|
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
|
||||||
$this->configurationManager->SetBackupMode('restore');
|
$this->configurationManager->SetBackupMode('restore');
|
||||||
$config = $this->configurationManager->GetConfig();
|
|
||||||
$config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'] ?? '';
|
|
||||||
if (isset($request->getParsedBody()['restore-exclude-previews'])) {
|
if (isset($request->getParsedBody()['restore-exclude-previews'])) {
|
||||||
$config['restore-exclude-previews'] = 1;
|
$config['restore-exclude-previews'] = 1;
|
||||||
} else {
|
} else {
|
||||||
$config['restore-exclude-previews'] = '';
|
$config['restore-exclude-previews'] = '';
|
||||||
}
|
}
|
||||||
$this->configurationManager->WriteConfig($config);
|
$this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? '';
|
||||||
|
|
||||||
$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 string $selectedRestoreTime {
|
||||||
|
get => $this->get('selected-restore-time', '');
|
||||||
|
set { $this->set('selected-restore-time', $value); }
|
||||||
|
}
|
||||||
|
|
||||||
public string $AIO_URL {
|
public string $AIO_URL {
|
||||||
get => $this->get('AIO_URL', '');
|
get => $this->get('AIO_URL', '');
|
||||||
set { $this->set('AIO_URL', $value); }
|
set { $this->set('AIO_URL', $value); }
|
||||||
|
|
@ -467,15 +472,6 @@ class ConfigurationManager
|
||||||
$this->WriteConfig($config);
|
$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 {
|
public function GetRestoreExcludePreviews() : string {
|
||||||
$config = $this->GetConfig();
|
$config = $this->GetConfig();
|
||||||
if(!isset($config['restore-exclude-previews'])) {
|
if(!isset($config['restore-exclude-previews'])) {
|
||||||
|
|
|
||||||
|
|
@ -565,6 +565,7 @@ readonly class DockerActionManager {
|
||||||
'AIO_URL' => $this->configurationManager->AIO_URL,
|
'AIO_URL' => $this->configurationManager->AIO_URL,
|
||||||
'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(),
|
'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(),
|
||||||
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(),
|
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(),
|
||||||
|
'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(),
|
||||||
'TALK_PORT' => $this->configurationManager->GetTalkPort(),
|
'TALK_PORT' => $this->configurationManager->GetTalkPort(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue