From d60522893713df7359d0e02c841f35a65d2186aa Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Fri, 18 Jan 2013 13:11:29 +0100 Subject: first version of the trash bin app --- apps/files_trashbin/lib/hooks.php | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 apps/files_trashbin/lib/hooks.php (limited to 'apps/files_trashbin/lib/hooks.php') diff --git a/apps/files_trashbin/lib/hooks.php b/apps/files_trashbin/lib/hooks.php new file mode 100644 index 00000000000..d3bee105b51 --- /dev/null +++ b/apps/files_trashbin/lib/hooks.php @@ -0,0 +1,45 @@ +. + * + */ + +/** + * This class contains all hooks. + */ + +namespace OCA_Trash; + +class Hooks { + + /** + * @brief Copy files to trash bin + * @param array + * + * This function is connected to the delete signal of OC_Filesystem + * to copy the file to the trash bin + */ + public static function remove_hook($params) { + + if ( \OCP\App::isEnabled('files_trashbin') ) { + $path = $params['path']; + Trashbin::move2trash($path); + } + } +} -- cgit v1.2.3