summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-20 17:20:46 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-20 17:20:46 +0200
commit6308ca6b8a07d93f311aedfa7fb5937b90d46f26 (patch)
treebf7e64e34f1ecf247da3ae9243eae4b7aa28a459 /apps/files_sharing
parent008663989163ef612f7a34c0c097397c06c8feb2 (diff)
parent4510571aa15d18d958947efd380b211a9a12aaaa (diff)
downloadnextcloud-server-6308ca6b8a07d93f311aedfa7fb5937b90d46f26.tar.gz
nextcloud-server-6308ca6b8a07d93f311aedfa7fb5937b90d46f26.zip
Merge branch 'shared_log'
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/sharedstorage.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index 9c6df31d297..3befbe4cc27 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -322,6 +322,11 @@ class OC_Filestorage_Shared extends OC_Filestorage {
public function file_get_contents($path) {
$source = $this->getSource($path);
if ($source) {
+ $info = array(
+ 'target' => $this->datadir.$path,
+ 'source' => $source,
+ );
+ OCP\Util::emitHook('OC_Filestorage_Shared', 'file_get_contents', $info);
$storage = OC_Filesystem::getStorage($source);
return $storage->file_get_contents($this->getInternalPath($source));
}
@@ -331,6 +336,11 @@ class OC_Filestorage_Shared extends OC_Filestorage {
if ($this->is_writable($path)) {
$source = $this->getSource($path);
if ($source) {
+ $info = array(
+ 'target' => $this->datadir.$path,
+ 'source' => $source,
+ );
+ OCP\Util::emitHook('OC_Filestorage_Shared', 'file_put_contents', $info);
$storage = OC_Filesystem::getStorage($source);
$result = $storage->file_put_contents($this->getInternalPath($source), $data);
if ($result) {
@@ -418,6 +428,12 @@ class OC_Filestorage_Shared extends OC_Filestorage {
public function fopen($path, $mode) {
$source = $this->getSource($path);
if ($source) {
+ $info = array(
+ 'target' => $this->datadir.$path,
+ 'source' => $source,
+ 'mode' => $mode,
+ );
+ OCP\Util::emitHook('OC_Filestorage_Shared', 'fopen', $info);
$storage = OC_Filesystem::getStorage($source);
return $storage->fopen($this->getInternalPath($source), $mode);
}