MDL-37014 repository_webdav - strip the server URL from file & folder paths returned by webdav lib (if present)
Conflicts: repository/webdav/lib.php
This commit is contained in:
@@ -138,6 +138,9 @@ class repository_webdav extends repository {
|
||||
$filedate = '';
|
||||
}
|
||||
|
||||
// Remove the server URL from the path (if present), otherwise links will not work - MDL-37014
|
||||
$server = preg_quote($this->options['webdav_server']);
|
||||
$v['href'] = preg_replace("#https?://{$server}#", '', $v['href']);
|
||||
if (!empty($v['resourcetype']) && $v['resourcetype'] == 'collection') {
|
||||
// a folder
|
||||
if (ltrim($path, '/') != urldecode(ltrim($v['href'], '/'))) {
|
||||
|
||||
Reference in New Issue
Block a user