diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-18 13:11:29 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-22 15:33:53 +0100 |
commit | d60522893713df7359d0e02c841f35a65d2186aa (patch) | |
tree | b3ad81d7cc9163b3bed08e6ec2ce20dea643822f /apps/files_trashbin/ajax | |
parent | 8259768732e3456c5cc54cfe43975513881b6124 (diff) | |
download | nextcloud-server-d60522893713df7359d0e02c841f35a65d2186aa.tar.gz nextcloud-server-d60522893713df7359d0e02c841f35a65d2186aa.zip |
first version of the trash bin app
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r-- | apps/files_trashbin/ajax/undelete.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php new file mode 100644 index 00000000000..c5480348285 --- /dev/null +++ b/apps/files_trashbin/ajax/undelete.php @@ -0,0 +1,13 @@ +<?php + +if(!OC_User::isLoggedIn()) {
+ exit;
+} + +$timestamp = isset( $_REQUEST['timestamp'] ) ? $_REQUEST['timestamp'] : ''; +$filename = isset( $_REQUEST['filename'] ) ? trim($_REQUEST['filename'], '/\\') : ''; + +OCA_Trash\Trashbin::restore($filename, $timestamp); + +//TODO: return useful data after succsessful restore operation and remove restored files from the list view +OCP\JSON::success(array("data" => array('content'=>'foo', 'id' => 'bar')));
\ No newline at end of file |