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

OwncloudFolder::createSubfolder: use name from StandardFolder instead of its ID, re #12

parent ae695759
No related branches found
No related tags found
No related merge requests found
......@@ -296,11 +296,15 @@ class OwncloudFolder extends VirtualFolderType {
{
$webdav = $this->getWebDavURL();
if ($foldertype->getId()) {
$name = explode('/', $foldertype->getId());
$name = end($name);
} else {
if ($foldertype instanceof StandardFolder) {
$name = rawurlencode($foldertype->name);
} else {
if ($foldertype->getId()) {
$name = explode('/', $foldertype->getId());
$name = end($name);
} else {
$name = rawurlencode($foldertype->name);
}
}
if ($this->folderExists($name)) {
$name_raw = $name;
......@@ -313,7 +317,7 @@ class OwncloudFolder extends VirtualFolderType {
}
$destination = $this->id . (mb_strlen($this->id)?'/':'') . $name;
$header = array();
$header = [];
$header[] = self::getAuthHeader();
$r = curl_init();
......
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