Changeset View
Changeset View
Standalone View
Standalone View
lib/file_wopi.php
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | protected function capabilities() | ||||
$body = $response->getBody(); | $body = $response->getBody(); | ||||
$code = $response->getStatus(); | $code = $response->getStatus(); | ||||
if (empty($body) || $code != 200) { | if (empty($body) || $code != 200) { | ||||
throw new Exception("Unexpected WOPI discovery response"); | throw new Exception("Unexpected WOPI discovery response"); | ||||
} | } | ||||
} | } | ||||
catch (Exception $e) { | catch (Exception $e) { | ||||
rcube::raise_error($e, true, false); | rcube::raise_error("WOPI disovery failed: $e->getMessage()", true, false); | ||||
// Don't bail out here, it would make the kolab_files UI broken | // Don't bail out here, it would make the kolab_files UI broken | ||||
return array(); | return array(); | ||||
} | } | ||||
// parse XML output | // parse XML output | ||||
// <wopi-discovery> | // <wopi-discovery> | ||||
// <net-zone name="external-http"> | // <net-zone name="external-http"> | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |