[Pkg-owncloud-commits] [owncloud] 96/215: propagate changes up reshares

David Prévot taffit at moszumanska.debian.org
Tue May 5 01:01:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 77fbb4125b95d6fb9c8572bffa007bcf77e16dfa
Author: Robin Appelman <icewind at owncloud.com>
Date:   Thu Apr 16 15:13:00 2015 +0200

    propagate changes up reshares
---
 apps/files_sharing/lib/propagation/recipientpropagator.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php
index da71612..e1b3523 100644
--- a/apps/files_sharing/lib/propagation/recipientpropagator.php
+++ b/apps/files_sharing/lib/propagation/recipientpropagator.php
@@ -9,6 +9,7 @@
 namespace OCA\Files_Sharing\Propagation;
 
 use OC\Files\Cache\ChangePropagator;
+use OC\Files\View;
 use OC\Share\Share;
 
 /**
@@ -91,6 +92,7 @@ class RecipientPropagator {
 		}
 		$this->config->setAppValue('files_sharing', $share['id'], $time);
 	}
+
 	/**
 	 * Listen on the propagator for updates made to shares owned by a user
 	 *
@@ -101,7 +103,15 @@ class RecipientPropagator {
 		$propagator->listen('\OC\Files', 'propagate', function ($path, $entry) use ($owner) {
 			$shares = Share::getAllSharesForFileId($entry['fileid']);
 			foreach ($shares as $share) {
+				// propagate down the share tree
 				$this->markDirty($share, time());
+
+				// propagate up the share tree
+				$user = $share['uid_owner'];
+				$view = new View('/' . $user . '/files');
+				$path = $view->getPath($share['file_source']);
+				$watcher = new ChangeWatcher($view);
+				$watcher->writeHook(['path' => $path]);
 			}
 		});
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list