Changeset View
Changeset View
Standalone View
Standalone View
lib/api/file_info.php
Show All 28 Lines | class file_api_file_info extends file_api_common | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
parent::handle(); | parent::handle(); | ||||
// check Manticore support. Note: we don't use config->get('fileapi_manticore') | // check Manticore support. Note: we don't use config->get('fileapi_manticore') | ||||
// here as it may be not properly set if backend driver wasn't initialized yet | // here as it may be not properly set if backend driver wasn't initialized yet | ||||
$capabilities = $this->api->capabilities(false); | $capabilities = $this->api->capabilities(false); | ||||
$manticore = $capabilities['MANTICORE']; | $manticore = $capabilities['MANTICORE'] ?? null; | ||||
$wopi = $capabilities['WOPI']; | $wopi = $capabilities['WOPI'] ?? null; | ||||
// support file_info by session ID | // support file_info by session ID | ||||
if (!isset($this->args['file']) || $this->args['file'] === '') { | if (!isset($this->args['file']) || $this->args['file'] === '') { | ||||
if (($manticore || $wopi) && !empty($this->args['session'])) { | if (($manticore || $wopi) && !empty($this->args['session'])) { | ||||
if ($info = $this->file_document_file($this->args['session'])) { | if ($info = $this->file_document_file($this->args['session'])) { | ||||
$this->args['file'] = $info['file']; | $this->args['file'] = $info['file']; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |