Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-09-10 16:07:57 +0300
committerGitHub <noreply@github.com>2020-09-10 16:07:57 +0300
commit1123c2be7356dbf1601492de0324a267ac053dbd (patch)
treebce2257b8f9da7b832a7b4ba3f41f521100b916c /lib
parent56439d25a22974d6f71993fb2b63461e20386866 (diff)
parent41ba1c4b6c25b25abbdb85d0849b4be609827170 (diff)
Merge pull request #1150 from mrkara/arm64
Diffstat (limited to 'lib')
-rw-r--r--lib/AppInfo/Application.php12
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=';