diff options
author | shadlaws <shad@shadlaws.com> | 2013-02-17 23:19:35 +0100 |
---|---|---|
committer | shadlaws <shad@shadlaws.com> | 2013-02-17 23:19:35 +0100 |
commit | fd0051dab7258c817ff01877bd4324530ce79398 (patch) | |
tree | 6436553d04c789c36cc9eeafe87a35d47bce9098 /modules/rest | |
parent | 87d20c63af02ae573853da2cb82d7323a56677b5 (diff) |
#2006 - Add system::mark_file_for_delete API to delete files at shutdown.
- added system::mark_file_for_delete to be called to mark a file
- added system::delete_marked_files to be called at shutdown to delete the list
- amended system::temp_filename to, by default, add the temp name to the list
- updated a few other places in code where this should be used
Diffstat (limited to 'modules/rest')
-rw-r--r-- | modules/rest/controllers/rest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php index bd03b334..54ca6fe9 100644 --- a/modules/rest/controllers/rest.php +++ b/modules/rest/controllers/rest.php @@ -69,7 +69,7 @@ class Rest_Controller extends Controller { $request->params = (object) $input->post(); if (isset($_FILES["file"])) { $request->file = upload::save("file"); - Event::add("system.shutdown", create_function("", "unlink(\"{$request->file}\");")); + system::delete_later($request->file); } break; } |