diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-06-27 17:27:47 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-06-27 17:27:47 +0200 |
commit | 6f5d5b9a307f0c3d4f751c5bd7b877757637b309 (patch) | |
tree | e889e2fa0bd6d9a3ebe9f7e2a3574b52e5b38729 /apps/files_sharing/lib/external | |
parent | 5b8c2ac750e79e574b49e0ba7ac866f0d5002003 (diff) | |
download | nextcloud-server-6f5d5b9a307f0c3d4f751c5bd7b877757637b309.tar.gz nextcloud-server-6f5d5b9a307f0c3d4f751c5bd7b877757637b309.zip |
Also check for updated permissions for webdav storages
Diffstat (limited to 'apps/files_sharing/lib/external')
-rw-r--r-- | apps/files_sharing/lib/external/storage.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 2771f974614..f3674155799 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -33,6 +33,8 @@ class Storage extends DAV implements ISharedStorage { */ private $token; + private $updateChecked = false; + public function __construct($options) { $this->remote = $options['remote']; $this->remoteUser = $options['owner']; @@ -100,4 +102,20 @@ class Storage extends DAV implements ISharedStorage { } return $this->scanner; } + + /** + * check if a file or folder has been updated since $time + * + * @param string $path + * @param int $time + * @return bool + */ + public function hasUpdated($path, $time) { + // since we check updates for the entire storage at once, we only need to check once per request + if ($this->updateChecked) { + return false; + } + $this->updateChecked = true; + return parent::hasUpdated('', $time); + } } |