Skip to content
Snippets Groups Projects
Commit ae695759 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fixed moving files inside of a Nextcloud/Owncloud, fixes #5

parent e88b2290
No related branches found
No related tags found
No related merge requests found
...@@ -102,6 +102,9 @@ class OwncloudFolder extends VirtualFolderType { ...@@ -102,6 +102,9 @@ class OwncloudFolder extends VirtualFolderType {
public function addFile(FileType $file, $user_id = null) public function addFile(FileType $file, $user_id = null)
{ {
if ($file instanceof OwncloudFile) {
return $this->copyFile($file->getID());
}
$webdav = $this->getWebDavURL(); $webdav = $this->getWebDavURL();
if ($this->fileExists($file->getFilename())) { if ($this->fileExists($file->getFilename())) {
...@@ -562,4 +565,16 @@ class OwncloudFolder extends VirtualFolderType { ...@@ -562,4 +565,16 @@ class OwncloudFolder extends VirtualFolderType {
{ {
return []; return [];
} }
public function validateUpload(FileType $file, $user_id)
{
if ($file instanceof OwncloudFile) {
//A file in the Nextcloud/Owncloud shall be validated.
//That is simple:
return true;
} else {
return parent::validateUpload($file, $user_id);
}
}
} }
pluginname=OwnCloudPlugin pluginname=OwnCloudPlugin
pluginclassname=OwnCloudPlugin pluginclassname=OwnCloudPlugin
version=2.1.1 version=2.1.2
origin=data-quest origin=data-quest
studipMinVersion=5.0 studipMinVersion=5.0
studipMaxVersion=5.3.99 studipMaxVersion=5.3.99
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment