diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-11-10 16:14:08 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-11-19 13:32:00 +0100 |
commit | 888df3933df7f3588de11085035d2d3ae9292fb0 (patch) | |
tree | b7976666e9249b0be163b57fb064f3a1ade26919 /apps/files_sharing/lib/sharedpropagator.php | |
parent | d006a7c723e4c51a4132b0f8817392bf1f3cd534 (diff) | |
download | nextcloud-server-888df3933df7f3588de11085035d2d3ae9292fb0.tar.gz nextcloud-server-888df3933df7f3588de11085035d2d3ae9292fb0.zip |
take the etag of child mounts into account for the folder etag
this replaces shared etag propagation
Diffstat (limited to 'apps/files_sharing/lib/sharedpropagator.php')
-rw-r--r-- | apps/files_sharing/lib/sharedpropagator.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/sharedpropagator.php b/apps/files_sharing/lib/sharedpropagator.php new file mode 100644 index 00000000000..fcb4b92dd33 --- /dev/null +++ b/apps/files_sharing/lib/sharedpropagator.php @@ -0,0 +1,43 @@ +<?php +/** + * @author Robin Appelman <icewind@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\Files_Sharing; + +use OC\Files\Cache\Propagator; + +class SharedPropagator extends Propagator { + /** + * @var \OC\Files\Storage\Shared + */ + protected $storage; + + /** + * @param string $internalPath + * @param int $time + * @return array[] all propagated entries + */ + public function propagateChange($internalPath, $time) { + $source = $this->storage->getSourcePath($internalPath); + /** @var \OC\Files\Storage\Storage $storage */ + list($storage, $sourceInternalPath) = \OC\Files\Filesystem::resolvePath($source); + return $storage->getPropagator()->propagateChange($sourceInternalPath, $time); + } +} |