diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2020-05-28 17:58:01 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2020-05-28 21:22:27 +0300 |
commit | 512499670845653e36eaadb29ed9529da1097dc1 (patch) | |
tree | e3df6ba8d4ce682ae8a27106f5d0bb1b36b2b127 /lib | |
parent | 694ce913db67e56dd674f26f6f17bc67c6f888e1 (diff) |
Refresh timed-out capabilities when built-in CODE is enabled
Signed-off-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/CapabilitiesService.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Service/CapabilitiesService.php b/lib/Service/CapabilitiesService.php index c6eb90b4..8cdd3264 100644 --- a/lib/Service/CapabilitiesService.php +++ b/lib/Service/CapabilitiesService.php @@ -54,6 +54,11 @@ class CapabilitiesService { public function getCapabilities() { if ($this->capabilities) { + $isCODEInstalled = $this->getContainer()->getServer()->getAppManager()->isEnabledForUser('richdocumentscode'); + $isCODEEnabled = strpos($this->config->getAppValue('richdocuments', 'wopi_url'), 'proxy.php?req=') !== false; + if($isCODEInstalled && $isCODEEnabled && count($this->capabilities) === 0) { + $this->refretch(); + } return $this->capabilities; } try { |