diff options
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r-- | Zotlabs/Storage/Browser.php | 5 | ||||
-rw-r--r-- | Zotlabs/Storage/Directory.php | 20 |
2 files changed, 19 insertions, 6 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index dd3067cf8..c21b68971 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -12,7 +12,7 @@ use Sabre\DAV; * * @extends \\Sabre\\DAV\\Browser\\Plugin * - * @link http://github.com/friendica/red + * @link http://github.com/redmatrix/hubzilla * @license http://opensource.org/licenses/mit-license.php The MIT License (MIT) */ class Browser extends DAV\Browser\Plugin { @@ -373,8 +373,6 @@ class Browser extends DAV\Browser\Plugin { if(strpos($path,$special) === 0) $path = trim(substr($path,$count),'/'); - $info = t('Please use DAV to upload large (video, audio) files.<br>See <a class="zrl" href="help/member/member_guide#Cloud_Desktop_Clients">Cloud Desktop Clients</a>'); - $output .= replace_macros(get_markup_template('cloud_actionspanel.tpl'), array( '$folder_header' => t('Create new folder'), @@ -382,7 +380,6 @@ class Browser extends DAV\Browser\Plugin { '$upload_header' => t('Upload file'), '$upload_submit' => t('Upload'), '$quota' => $quota, - '$info' => $info, '$channick' => $this->auth->owner_nick, '$aclselect' => $aclselect, '$allow_cid' => acl2json($channel_acl['allow_cid']), diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 45df9ddd5..510d463c1 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -16,7 +16,7 @@ use Sabre\DAV; * @link http://github.com/friendica/red * @license http://opensource.org/licenses/mit-license.php The MIT License (MIT) */ -class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { +class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMoveTarget { /** * @brief The path inside /cloud @@ -457,6 +457,22 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { return false; } + + public function moveInto($targetName,$sourcePath, DAV\INode $sourceNode) { + + if(! $this->auth->owner_id) { + return false; + } + + if(! ($sourceNode->data && $sourceNode->data->hash)) { + return false; + } + + return attach_move($this->auth->owner_id, $sourceNode->data->hash, $this->folder_hash); + + } + + /** * @todo add description of what this function does. * @@ -675,7 +691,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { } $prefix = ''; - $suffix = ''; + $suffix = ' order by is_dir desc, filename asc '; $r = q("select $prefix id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, created, edited from attach where folder = '%s' and uid = %d $perms $suffix", dbesc($folder), |