aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-03-01 12:20:29 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-03-01 12:20:29 +0100
commit7c360c24919b566a15237c0958af45dc63a1b58e (patch)
treefe705acabf944e0092897f6cd8476c87fc65f375
parent09dc15d2b190dbce3a2fe3b09e464ff534db0659 (diff)
downloadnextcloud-server-7c360c24919b566a15237c0958af45dc63a1b58e.tar.gz
nextcloud-server-7c360c24919b566a15237c0958af45dc63a1b58e.zip
add post_moveToTrash and post_restore signals to the trash bin
-rw-r--r--apps/files_trashbin/lib/trash.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index 0b8472198d9..f83716aba02 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -71,6 +71,7 @@ class Trashbin {
\OC_Log::write('files_trashbin', 'trash bin database couldn\'t be updated', \OC_log::ERROR);
return;
}
+ \OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_moveToTrash', array('path' => \OC\Files\Filesystem::normalizePath($file_path)));
// Take care of file versions
if ( \OCP\App::isEnabled('files_versions') ) {
@@ -173,6 +174,7 @@ class Trashbin {
$mtime = $view->filemtime($source);
if( $view->rename($source, $target.$ext) ) {
$view->touch($target.$ext, $mtime);
+ \OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', array('path' => \OC\Files\Filesystem::normalizePath('/'.$location.'/'.$filename.$ext)));
if ($view->is_dir($target.$ext)) {
$trashbinSize -= self::calculateSize(new \OC\Files\View('/'.$user.'/'.$target.$ext));
} else {