mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
Merge branch 'MDL-37014_webdav_folders' of git://github.com/davosmith/moodle
This commit is contained in:
commit
033b07895c
1 changed files with 3 additions and 0 deletions
|
@ -120,6 +120,9 @@ class repository_webdav extends repository {
|
||||||
$v['lastmodified'] = null;
|
$v['lastmodified'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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']);
|
||||||
// Extracting object title from absolute path
|
// Extracting object title from absolute path
|
||||||
$v['href'] = substr(urldecode($v['href']), strlen($webdavpath));
|
$v['href'] = substr(urldecode($v['href']), strlen($webdavpath));
|
||||||
$title = substr($v['href'], strlen($path));
|
$title = substr($v['href'], strlen($path));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue