diff options
-rw-r--r-- | apps/files_sharing/lib/updater.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php index a43ab2e2a0a..e0f8fc5f0f6 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/updater.php @@ -57,6 +57,14 @@ class Shared_Updater { } } + private static function removeShare($path) { + $fileInfo = \OC\Files\Filesystem::getFileInfo($path); + $fileSource = $fileInfo['fileid']; + + $query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source`=?'); + \OC_DB::executeAudited($query, array($fileSource)); + } + /** * @param array $params */ @@ -77,8 +85,10 @@ class Shared_Updater { */ static public function deleteHook($params) { self::correctFolders($params['path']); + self::removeShare($params['path']); } + /** * @param array $params */ |