diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-09-10 16:07:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 16:07:57 +0300 |
commit | 1123c2be7356dbf1601492de0324a267ac053dbd (patch) | |
tree | bce2257b8f9da7b832a7b4ba3f41f521100b916c /lib | |
parent | 56439d25a22974d6f71993fb2b63461e20386866 (diff) | |
parent | 41ba1c4b6c25b25abbdb85d0849b4be609827170 (diff) |
Merge pull request #1150 from mrkara/arm64
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AppInfo/Application.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 07485aa7..0e7f0b8e 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -156,11 +156,15 @@ class Application extends App { } public function checkAndEnableCODEServer() { - // Supported only on Linux OS, and x86_64 platform - if (PHP_OS_FAMILY !== 'Linux' || php_uname('m') !== 'x86_64') + // Supported only on Linux OS, and x86_64 & ARM64 platforms + $supportedArchs = array('x86_64', 'aarch64'); + $osFamily = PHP_VERSION_ID >= 70200 ? PHP_OS_FAMILY : PHP_OS; + if ($osFamily !== 'Linux' || !in_array(php_uname('m'), $supportedArchs)) return; - if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser('richdocumentscode')) { + $CODEAppID = (php_uname('m') === 'x86_64') ? 'richdocumentscode' : 'richdocumentscode_arm64'; + + if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser($CODEAppID)) { $appConfig = $this->getContainer()->query(AppConfig::class); $wopi_url = $appConfig->getAppValue('wopi_url'); @@ -170,7 +174,7 @@ class Application extends App { } $urlGenerator = \OC::$server->getURLGenerator(); - $relativeUrl = $urlGenerator->linkTo('richdocumentscode', '') . 'proxy.php'; + $relativeUrl = $urlGenerator->linkTo($CODEAppID, '') . 'proxy.php'; $absoluteUrl = $urlGenerator->getAbsoluteURL($relativeUrl); $wopi_url = $absoluteUrl . '?req='; |