mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Make install_latest_major an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
06fdf31c87
commit
1d11a4682b
3 changed files with 7 additions and 19 deletions
|
|
@ -181,16 +181,7 @@ readonly class DockerController {
|
|||
$port = 443;
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['install_latest_major'])) {
|
||||
$installLatestMajor = 32;
|
||||
} else {
|
||||
$installLatestMajor = "";
|
||||
}
|
||||
|
||||
$config = $this->configurationManager->GetConfig();
|
||||
// set install_latest_major
|
||||
$config['install_latest_major'] = $installLatestMajor;
|
||||
$this->configurationManager->WriteConfig($config);
|
||||
$this->configurationManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']);
|
||||
// set AIO_URL
|
||||
$this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path;
|
||||
// set wasStartButtonClicked
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ class ConfigurationManager
|
|||
set { $this->set('wasStartButtonClicked', $value); }
|
||||
}
|
||||
|
||||
public bool $install_latest_major {
|
||||
get => $this->get('install_latest_major', false);
|
||||
set { $this->set('install_latest_major', $value); }
|
||||
}
|
||||
|
||||
public function GetConfig() : array
|
||||
{
|
||||
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
|
||||
|
|
@ -889,14 +894,6 @@ class ConfigurationManager
|
|||
}
|
||||
}
|
||||
|
||||
public function shouldLatestMajorGetInstalled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['install_latest_major'])) {
|
||||
$config['install_latest_major'] = '';
|
||||
}
|
||||
return $config['install_latest_major'] !== '';
|
||||
}
|
||||
|
||||
public function GetAdditionalBackupDirectoriesString() : string {
|
||||
if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) {
|
||||
return '';
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ readonly class DockerActionManager {
|
|||
'NEXTCLOUD_STARTUP_APPS' => $this->configurationManager->GetNextcloudStartupApps(),
|
||||
'NEXTCLOUD_ADDITIONAL_APKS' => $this->configurationManager->GetNextcloudAdditionalApks(),
|
||||
'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->configurationManager->GetNextcloudAdditionalPhpExtensions(),
|
||||
'INSTALL_LATEST_MAJOR' => $this->configurationManager->shouldLatestMajorGetInstalled() ? 'yes' : '',
|
||||
'INSTALL_LATEST_MAJOR' => $this->configurationManager->install_latest_major ? 'yes' : '',
|
||||
'REMOVE_DISABLED_APPS' => $this->configurationManager->shouldDisabledAppsGetRemoved() ? 'yes' : '',
|
||||
// Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then)
|
||||
'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue