Make AIO_URL an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 13:09:52 +01:00
parent 3b26cd7b22
commit cc2a6dde65
3 changed files with 8 additions and 12 deletions

View file

@ -188,11 +188,11 @@ readonly class DockerController {
}
$config = $this->configurationManager->GetConfig();
// set AIO_URL
$config['AIO_URL'] = $host . ':' . (string)$port . $path;
// set install_latest_major
$config['install_latest_major'] = $installLatestMajor;
$this->configurationManager->WriteConfig($config);
// set AIO_URL
$this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path;
// set wasStartButtonClicked
$this->configurationManager->wasStartButtonClicked = true;

View file

@ -23,6 +23,11 @@ class ConfigurationManager
set { $this->set('password', $value); }
}
public string $AIO_URL {
get => $this->get('AIO_URL', '');
set { $this->set('AIO_URL', $value); }
}
public bool $wasStartButtonClicked {
get => $this->get('wasStartButtonClicked', false);
set { $this->set('wasStartButtonClicked', $value); }
@ -475,15 +480,6 @@ class ConfigurationManager
return $config['restore-exclude-previews'];
}
public function GetAIOURL() : string {
$config = $this->GetConfig();
if(!isset($config['AIO_URL'])) {
$config['AIO_URL'] = '';
}
return $config['AIO_URL'];
}
/**
* @throws InvalidSettingConfigurationException
*/

View file

@ -562,7 +562,7 @@ readonly class DockerActionManager {
'AIO_TOKEN' => $this->configurationManager->AIO_TOKEN,
'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(),
'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(),
'AIO_URL' => $this->configurationManager->GetAIOURL(),
'AIO_URL' => $this->configurationManager->AIO_URL,
'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(),
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(),
'APACHE_PORT' => $this->configurationManager->GetApachePort(),