Merge branch 'MDL-37014_webdav_folders_22' of git://github.com/davosmith/moodle into MOODLE_22_STABLE

This commit is contained in:
Dan Poltawski
2012-12-18 14:52:59 +08:00
+3
View File
@@ -134,6 +134,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'], '/'))) {