Skip to content

Commit

Permalink
MDL-27530 The webdav-repository loads empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Grabs committed May 16, 2011
1 parent de58499 commit a193a0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions repository/webdav/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a
public function check_login() {
return true;
}
public function get_file($path, $title) {
public function get_file($url, $title) {
global $CFG;
$path = urldecode($path);
$url = urldecode($url);
$path = $this->prepare_file($title);
$buffer = '';
if (!$this->dav->open()) {
return false;
}
$this->dav->get($path, $buffer);
$this->dav->get($url, $buffer);
$fp = fopen($path, 'wb');
fwrite($fp, $buffer);
return array('path'=>$path);
Expand Down

0 comments on commit a193a0c

Please sign in to comment.