[Pkg-owncloud-commits] [owncloud] 48/67: delete fscache on deleting user

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:10:42 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.

commit ef3e5899c6a5c0ef0b370762ffeddc810fa96feb
Author: scambra <sergio at entrecables.com>
Date:   Thu Jun 14 16:09:32 2012 +0200

    delete fscache on deleting user
---
 lib/filecache.php        |    3 ++-
 lib/filecache/update.php |    8 ++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/filecache.php b/lib/filecache.php
index 8fcb6fd..a36cfef 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -203,7 +203,7 @@ class OC_FileCache{
 
 		OC_Cache::remove('fileid/'.$root.$path);
 	}
-
+	
 	/**
 	 * return array of filenames matching the querty
 	 * @param string $query
@@ -509,3 +509,4 @@ class OC_FileCache{
 OC_Hook::connect('OC_Filesystem','post_write','OC_FileCache_Update','fileSystemWatcherWrite');
 OC_Hook::connect('OC_Filesystem','post_delete','OC_FileCache_Update','fileSystemWatcherDelete');
 OC_Hook::connect('OC_Filesystem','post_rename','OC_FileCache_Update','fileSystemWatcherRename');
+OC_Hook::connect('OC_User','post_deleteUser','OC_FileCache_Update','deleteFromUser');
diff --git a/lib/filecache/update.php b/lib/filecache/update.php
index 4a5ea87..f9d64d0 100644
--- a/lib/filecache/update.php
+++ b/lib/filecache/update.php
@@ -216,4 +216,12 @@ class OC_FileCache_Update{
 		OC_FileCache::increaseSize(dirname($newPath), $oldSize, $root);
 		OC_FileCache::move($oldPath, $newPath);
 	}
+
+	/**
+	 * delete files owned by user from the cache
+	 * @param string $parameters$parameters["uid"])
+	 */
+	public static function deleteFromUser($parameters) {
+		OC_FileCache::clear($parameters["uid"]);
+	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list