diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-05-29 13:23:50 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-05-29 13:23:50 +0300 |
commit | 2a6744eeba2a8cb4a50d757973e45ca61cd6eb45 (patch) | |
tree | 9cb58cef3f2facc9788379287a249f92d139a3e9 /lib | |
parent | 95029aeb46786fc4daf5daa8010412a3471282f5 (diff) |
Fix code style
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AppInfo/Application.php | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index dfbd7b89..ae7ef33e 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -42,9 +42,6 @@ use OCP\AppFramework\App; use OCP\EventDispatcher\IEventDispatcher; use OCP\IPreview; - - - class Application extends App { const APPNAME = 'richdocuments'; @@ -138,34 +135,34 @@ class Application extends App { $cspManager->addDefaultPolicy($policy); } - public function checkAndEnableCODEServer() { - // Supported only on Linux OS, and x86_64 platform - if (PHP_OS_FAMILY !== 'Linux' || php_uname('m') !== 'x86_64') - return; + public function checkAndEnableCODEServer() { + // Supported only on Linux OS, and x86_64 platform + if (PHP_OS_FAMILY !== 'Linux' || php_uname('m') !== 'x86_64') + return; - if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser('richdocumentscode')) { - $appConfig = $this->getContainer()->query(AppConfig::class); - $wopi_url = $appConfig->getAppValue('wopi_url'); + if ($this->getContainer()->getServer()->getAppManager()->isEnabledForUser('richdocumentscode')) { + $appConfig = $this->getContainer()->query(AppConfig::class); + $wopi_url = $appConfig->getAppValue('wopi_url'); - // Check if we have the wopi_url set currently - if ($wopi_url !== null && $wopi_url !== '') { - return; - } + // Check if we have the wopi_url set currently + if ($wopi_url !== null && $wopi_url !== '') { + return; + } - $urlGenerator = \OC::$server->getURLGenerator(); - $relativeUrl = $urlGenerator->linkTo('richdocumentscode', '') . 'proxy.php'; - $absoluteUrl = $urlGenerator->getAbsoluteURL($relativeUrl); - $wopi_url = $absoluteUrl . '?req='; + $urlGenerator = \OC::$server->getURLGenerator(); + $relativeUrl = $urlGenerator->linkTo('richdocumentscode', '') . 'proxy.php'; + $absoluteUrl = $urlGenerator->getAbsoluteURL($relativeUrl); + $wopi_url = $absoluteUrl . '?req='; - $appConfig->setAppValue('wopi_url', $wopi_url); - $appConfig->setAppValue('disable_certificate_verification', 'yes'); + $appConfig->setAppValue('wopi_url', $wopi_url); + $appConfig->setAppValue('disable_certificate_verification', 'yes'); - $discoveryManager = $this->getContainer()->query(DiscoveryManager::class); - $capabilitiesService = $this->getContainer()->query(CapabilitiesService::class); + $discoveryManager = $this->getContainer()->query(DiscoveryManager::class); + $capabilitiesService = $this->getContainer()->query(CapabilitiesService::class); - $discoveryManager->refretch(); - $capabilitiesService->clear(); - $capabilitiesService->refretch(); - } - } + $discoveryManager->refretch(); + $capabilitiesService->clear(); + $capabilitiesService->refretch(); + } + } } |