Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
"SIGNALING_SECRET=%SIGNALING_SECRET%",
"ONLYOFFICE_SECRET=%ONLYOFFICE_SECRET%",
"AIO_URL=%AIO_URL%",
"NC_AIO_VERSION=v%AIO_VERSION%",
"NEXTCLOUD_MOUNT=%NEXTCLOUD_MOUNT%",
"CLAMAV_ENABLED=%CLAMAV_ENABLED%",
"CLAMAV_HOST=nextcloud-aio-clamav",
Expand Down
9 changes: 9 additions & 0 deletions php/src/Data/ConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,14 @@ public function GetBackupTimes() : array {
return $backupTimes;
}

public function getAioVersion() : string {
$path = DataConst::GetAioVersionFile();
if ($path !== '' && file_exists($path)) {
return trim((string)file_get_contents($path));
}
return '';
}

private function isx64Platform() : bool {
if (php_uname('m') === 'x86_64') {
return true;
Expand Down Expand Up @@ -1043,6 +1051,7 @@ private function getPlaceholderValue(string $placeholder) : string {
// Allow to get local ip-address of caddy container and add it to trusted proxies automatically
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? gethostbyname('nextcloud-aio-caddy') : '',
'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '',
'AIO_VERSION' => $this->getAioVersion(),
default => $this->GetRegisteredSecret($placeholder),
};
}
Expand Down
4 changes: 4 additions & 0 deletions php/src/Data/DataConst.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ public static function GetCollaboraSeccompProfilePath() : string {
public static function GetContainersDefinitionPath() : string {
return (string)realpath(__DIR__ . '/../../containers.json');
}

public static function GetAioVersionFile() : string {
return (string)realpath(__DIR__ . '/../../templates/includes/aio-version.twig');
}
}