Bring back sharedstorage hooks

This commit is contained in:
Roeland Jago Douma 2016-06-08 08:19:32 +02:00 committed by Arthur Schiwon
parent 6aab7d7232
commit b0dd0634e3
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 18 additions and 0 deletions

View File

@ -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);
}
}