aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-06-08 08:19:32 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 14:00:02 +0200
commitb0dd0634e35b3596fb1ebc0624617d07e7b1367e (patch)
tree74e198f257a9d617c4ecb5aed08750a459e31d8e
parent6aab7d72322f0e9dcb4198cf4c7aa9fbe18555bd (diff)
downloadnextcloud-server-b0dd0634e35b3596fb1ebc0624617d07e7b1367e.tar.gz
nextcloud-server-b0dd0634e35b3596fb1ebc0624617d07e7b1367e.zip
Bring back sharedstorage hooks
-rw-r--r--apps/files_sharing/lib/sharedstorage.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 965c4d36cad..b5b5e416884 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -415,4 +415,22 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
return $this->sourceStorage;
}
+ public function file_get_contents($path) {
+ $info = [
+ 'target' => $this->getMountPoint() . '/' . $path,
+ 'source' => $this->getSourcePath($path),
+ ];
+ \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_get_contents', $info);
+ return parent::file_get_contents($path);
+ }
+
+ public function file_put_contents($path, $data) {
+ $info = [
+ 'target' => $this->getMountPoint() . '/' . $path,
+ 'source' => $this->getSourcePath($path),
+ ];
+ \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_put_contents', $info);
+ return parent::file_put_contents($path, $data);
+ }
+
}