add additional parameter to signal
This commit is contained in:
parent
7c360c2491
commit
df2a9a3c60
|
@ -71,7 +71,9 @@ class Trashbin {
|
||||||
\OC_Log::write('files_trashbin', 'trash bin database couldn\'t be updated', \OC_log::ERROR);
|
\OC_Log::write('files_trashbin', 'trash bin database couldn\'t be updated', \OC_log::ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_moveToTrash', array('path' => \OC\Files\Filesystem::normalizePath($file_path)));
|
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_moveToTrash',
|
||||||
|
array('filePath' => \OC\Files\Filesystem::normalizePath($file_path),
|
||||||
|
'trashPath' => \OC\Files\Filesystem::normalizePath($deleted.'.d'.$timestamp)));
|
||||||
|
|
||||||
// Take care of file versions
|
// Take care of file versions
|
||||||
if ( \OCP\App::isEnabled('files_versions') ) {
|
if ( \OCP\App::isEnabled('files_versions') ) {
|
||||||
|
@ -174,7 +176,9 @@ class Trashbin {
|
||||||
$mtime = $view->filemtime($source);
|
$mtime = $view->filemtime($source);
|
||||||
if( $view->rename($source, $target.$ext) ) {
|
if( $view->rename($source, $target.$ext) ) {
|
||||||
$view->touch($target.$ext, $mtime);
|
$view->touch($target.$ext, $mtime);
|
||||||
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', array('path' => \OC\Files\Filesystem::normalizePath('/'.$location.'/'.$filename.$ext)));
|
\OCP\Util::emitHook('\OCA\Files_Trashbin\Trashbin', 'post_restore',
|
||||||
|
array('filePath' => \OC\Files\Filesystem::normalizePath('/'.$location.'/'.$filename.$ext),
|
||||||
|
'trashPath' => \OC\Files\Filesystem::normalizePath($file)));
|
||||||
if ($view->is_dir($target.$ext)) {
|
if ($view->is_dir($target.$ext)) {
|
||||||
$trashbinSize -= self::calculateSize(new \OC\Files\View('/'.$user.'/'.$target.$ext));
|
$trashbinSize -= self::calculateSize(new \OC\Files\View('/'.$user.'/'.$target.$ext));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue