wwe no longer have a versions table

This commit is contained in:
Bjoern Schiessle 2014-06-10 14:47:32 +02:00
parent 1d9b4aadbf
commit f4a183e753
3 changed files with 0 additions and 28 deletions

View File

@ -14,5 +14,3 @@ OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "wri
OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Versions\Hooks", "pre_remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Versions\Hooks", "pre_remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook"); OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook");
//Listen to delete user signal
OCP\Util::connectHook('OC_User', 'pre_deleteUser', "OCA\Files_Versions\Hooks", "deleteUser_hook");

View File

@ -74,19 +74,4 @@ class Hooks {
} }
} }
/**
* clean up user specific settings if user gets deleted
* @param array $params array with uid
*
* This function is connected to the pre_deleteUser signal of OC_Users
* to remove the used space for versions stored in the database
*/
public static function deleteUser_hook($params) {
if (\OCP\App::isEnabled('files_versions')) {
$uid = $params['uid'];
Storage::deleteUser($uid);
}
}
} }

View File

@ -301,17 +301,6 @@ class Storage {
} }
/**
* deletes used space for files versions in db if user was deleted
*
* @param string $uid id of deleted user
* @return \OC_DB_StatementWrapper of db delete operation
*/
public static function deleteUser($uid) {
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_versions` WHERE `user`=?');
return $query->execute(array($uid));
}
/** /**
* returns all stored file versions from a given user * returns all stored file versions from a given user
* @param string $uid id of the user * @param string $uid id of the user