Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trash backend doesn't emit notifications when deleting/restoring items #442

Open
rerobins opened this issue May 22, 2019 · 1 comment
Open
Labels
1. to develop Issues that are ready for development bug feature: trashbin Items related to the trashbin feature good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@rerobins
Copy link

files_trashbin emits several events when a file is removed or restored from the trashbin. These are not emitted by the lib/Trash/TrashBackend.php

public function restoreItem(ITrashItem $item) {

public function removeItem(ITrashItem $item) {

Specifically the events are:

\OC_Hook::emit('\OCP\Trashbin', 'delete', array('path' => $path));
\OC_Hook::emit('\OCP\Trashbin', 'preDelete', array('path' => $path));
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', array('filePath' => Filesystem::normalizePath('/' . $location . '/' . $uniqueFilename),
				'trashPath' => Filesystem::normalizePath($file)));
@rerobins rerobins changed the title Trash backend doesn't emit files when deleting Trash backend doesn't emit notifications when deleting/restoring items May 22, 2019
@pierreozoux pierreozoux added 0. Needs triage Issues that need to be triaged feature: trashbin Items related to the trashbin feature bug labels Mar 14, 2021
@fschrempf fschrempf added 1. to develop Issues that are ready for development good first issue Small tasks with clear documentation about how and in which place you need to fix things in. and removed 0. Needs triage Issues that need to be triaged labels Nov 4, 2021
@joshtrichards
Copy link
Member

#2641 added it for restoreItem(). So 1 of 2 in this issue are done. Adding the other can be modeled after that one now.

@joshtrichards joshtrichards added good first issue Small tasks with clear documentation about how and in which place you need to fix things in. and removed good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug feature: trashbin Items related to the trashbin feature good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

No branches or pull requests

4 participants