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:
authorMuhammet Kara <muhammet.kara@collabora.com>2020-09-09 11:23:19 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2020-09-09 11:23:35 +0300
commitbb5b59a3d4004d91a44cb1d491e71fb908f5ff03 (patch)
tree475ab55900666b140474b320581f2f9f94341279 /lib
parent8a3d6c6e06b725cbd5c582215bbe1b2f2f38a167 (diff)
arm64: Allow auto-enabling Built-in CODE Server on ARM64
Signed-off-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/AppInfo/Application.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 07485aa7..6883a3c7 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -156,11 +156,14 @@ 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');
+ if (PHP_OS_FAMILY !== '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 +173,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=';