diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-28 15:34:15 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-28 15:34:15 +0100 |
commit | c9c919da5738f963247307ca3878e06beff87ade (patch) | |
tree | 6b4a0c381fef34589559634555a653a57821002d /apps/files_external/lib/webdav.php | |
parent | bca5ce724e4fcecfe89da8839878c4da6f102e35 (diff) | |
download | nextcloud-server-c9c919da5738f963247307ca3878e06beff87ade.tar.gz nextcloud-server-c9c919da5738f963247307ca3878e06beff87ade.zip |
Move streamwrappers to seperate files and put them in a namespace
Diffstat (limited to 'apps/files_external/lib/webdav.php')
-rw-r--r-- | apps/files_external/lib/webdav.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 6d43a03058a..571b4d79ae2 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -104,13 +104,15 @@ class DAV extends \OC\Files\Storage\Common{ try { $response=$this->client->propfind($path, array(), 1); $id=md5('webdav'.$this->root.$path); + $content = array(); \OC_FakeDirStream::$dirs[$id]=array(); $files=array_keys($response); array_shift($files);//the first entry is the current directory foreach ($files as $file) { $file = urldecode(basename($file)); - \OC_FakeDirStream::$dirs[$id][]=$file; + $content[]=$file; } + \OC\Files\Stream\Dir::register($id, $content); return opendir('fakedir://'.$id); } catch(\Exception $e) { return false; @@ -194,7 +196,7 @@ class DAV extends \OC\Files\Storage\Common{ $ext=''; } $tmpFile = \OCP\Files::tmpFile($ext); - \OC_CloseStreamWrapper::$callBacks[$tmpFile]=array($this, 'writeBack'); + \OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack')); if($this->file_exists($path)) { $this->getFile($path, $tmpFile); } |