diff options
author | zotlabs <mike@macgirvin.com> | 2017-12-07 11:49:25 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-12-07 11:49:25 -0800 |
commit | 979c05b24da0497be582aacaa8b744f692b56ccf (patch) | |
tree | b311b0b398272ff4de778a72c12e748d2c15fa7c /Zotlabs | |
parent | e5653945d35e00ae1821fa93e502cc4555519735 (diff) | |
parent | 3dac1a8d4ae6d087ff9bea6f194b76a37e34f938 (diff) | |
download | volse-hubzilla-979c05b24da0497be582aacaa8b744f692b56ccf.tar.gz volse-hubzilla-979c05b24da0497be582aacaa8b744f692b56ccf.tar.bz2 volse-hubzilla-979c05b24da0497be582aacaa8b744f692b56ccf.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Photos.php | 5 | ||||
-rw-r--r-- | Zotlabs/Storage/Directory.php | 18 | ||||
-rw-r--r-- | Zotlabs/Widget/Wiki_pages.php | 2 |
3 files changed, 23 insertions, 2 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index 1c42c0510..81af607ec 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -202,6 +202,11 @@ class Photos extends \Zotlabs\Web\Controller { ); if(($m) && ($m[0]['folder'] != $_POST['move_to_album'])) { attach_move($page_owner_uid,argv(2),$_POST['move_to_album']); + + $sync = attach_export_data(\App::$data['channel'],argv(2),true); + if($sync) + build_sync_packet($page_owner_uid,array('file' => array($sync))); + if(! ($_POST['desc'] && $_POST['newtag'])) goaway(z_root() . '/' . $_SESSION['photo_return']); } diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 45df9ddd5..63ff4341c 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. * diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php index 46f12f092..ecd2c9100 100644 --- a/Zotlabs/Widget/Wiki_pages.php +++ b/Zotlabs/Widget/Wiki_pages.php @@ -21,7 +21,7 @@ class Wiki_pages { $can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_wiki'); $can_delete = ((local_channel() && (local_channel() == \App::$profile['uid'])) ? true : false); - $pageName = urlencode(escape_tags(urldecode(argv(3)))); + $pageName = addslashes(escape_tags(urldecode(argv(3)))); return replace_macros(get_markup_template('wiki_page_not_found.tpl'), array( '$resource_id' => $arr['resource_id'], |