aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Photos.php5
-rw-r--r--Zotlabs/Storage/Directory.php18
-rw-r--r--Zotlabs/Widget/Wiki_pages.php2
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'],