Skip to content

Commit

Permalink
Merge branch 'MDL-37014_webdav_folders_24' of git://github.com/davosm…
Browse files Browse the repository at this point in the history
…ith/moodle into MOODLE_24_STABLE
  • Loading branch information
danpoltawski committed Dec 18, 2012
2 parents f454c98 + 8f00192 commit eddec24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions repository/webdav/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public function get_listing($path='', $page = '') {
$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
$v['href'] = substr(urldecode($v['href']), strlen($webdavpath));
$title = substr($v['href'], strlen($path));
Expand Down

0 comments on commit eddec24

Please sign in to comment.