Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9958465
)
MDL-37014 repository_webdav - strip the server URL from file & folder paths returned...
author
Davo Smith
<git@davosmith.co.uk>
Wed, 5 Dec 2012 14:05:24 +0000
(14:05 +0000)
committer
Davo Smith
<git@davosmith.co.uk>
Wed, 12 Dec 2012 08:46:59 +0000
(08:46 +0000)
repository/webdav/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/repository/webdav/lib.php
b/repository/webdav/lib.php
index
aa35dfe
..
52ed0a8
100644
(file)
--- a/
repository/webdav/lib.php
+++ b/
repository/webdav/lib.php
@@
-124,6
+124,9
@@
class repository_webdav extends repository {
$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));