Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-37014 repository_webdav - strip the server URL from file & folder…

… paths returned by webdav lib (if present)

Conflicts:
	repository/webdav/lib.php
  • Loading branch information...
commit a0d9283306d85bc5b3cc8f94a7f4a4962ccca252 1 parent 15b3a43
@davosmith davosmith authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  repository/webdav/lib.php
View
3  repository/webdav/lib.php
@@ -138,6 +138,9 @@ public function get_listing($path='', $page = '') {
$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'], '/'))) {
Please sign in to comment.
Something went wrong with that request. Please try again.