Skip to content
Snippets Groups Projects
Commit f7a43391 authored by Robin Appelman's avatar Robin Appelman
Browse files

Cache: add option to delete file from permissions cache for all users

parent 93e713d3
Branches
No related tags found
No related merge requests found
......@@ -91,10 +91,15 @@ class Permissions {
* @param int $fileId
* @param string $user
*/
public function remove($fileId, $user) {
public function remove($fileId, $user = null) {
if (is_null($user)) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*permissions` WHERE `fileid` = ?');
$query->execute(array($fileId));
} else {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*permissions` WHERE `fileid` = ? AND `user` = ?');
$query->execute(array($fileId, $user));
}
}
public function removeMultiple($fileIds, $user) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*permissions` WHERE `fileid` = ? AND `user` = ?');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment