FIx so file href attribute is always an absolute URL (Bug #2063)
This commit is contained in:
parent
f68bf6675d
commit
963261269f
1 changed files with 6 additions and 0 deletions
|
@ -448,6 +448,12 @@ class kolab_files_engine
|
|||
}
|
||||
|
||||
if ($href = $this->file_data['viewer']['href']) {
|
||||
// file href attribute must be an absolute URL (Bug #2063)
|
||||
if (!empty($href)) {
|
||||
if (!preg_match('|^https?://|', $href)) {
|
||||
$href = $this->url . '/api/' . $href;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$token = $this->get_api_token();
|
||||
|
|
Loading…
Add table
Reference in a new issue