summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-09-26 11:36:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-01 17:29:04 +0100
commit5090f4cce2b49eb3e3262726e127caea6dd0932c (patch)
treedcafabd35f06241d7bfdb007860a6e0f64f9cb64
parente59da00f40e33975cc8ab33fa4a9aca9262eb83e (diff)
Remove cli client only functions
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/controllers/file/file_default.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/application/controllers/file/file_default.php b/application/controllers/file/file_default.php
index 563102026..f3c2f38ff 100644
--- a/application/controllers/file/file_default.php
+++ b/application/controllers/file/file_default.php
@@ -818,38 +818,6 @@ class File_default extends MY_Controller {
return $this->_show_url(array($ret["url_id"]), false);
}
- function delete()
- {
- $this->muser->require_access("apikey");
-
- if (!is_cli_client()) {
- throw new \exceptions\InsufficientPermissionsException("file/delete/unlisted-client", "Not a listed cli client, please use the history to delete uploads");
- }
-
- $id = $this->uri->segment(3);
- $this->data["id"] = $id;
- $userid = $this->muser->get_userid();
-
- foreach (array($this->mfile, $this->mmultipaste) as $model) {
- if ($model->id_exists($id)) {
- if ($model->get_owner($id) !== $userid) {
- echo "You don't own this file\n";
- return;
- }
- if ($model->delete_id($id)) {
- echo "$id has been deleted.\n";
- } else {
- echo "Deletion failed. Unknown error\n";
- }
- return;
- }
- }
-
- throw new \exceptions\NotFoundException("file/delete/unknown-id", "Unknown ID '$id'.", array(
- "id" => $id,
- ));
- }
-
/**
* Handle submissions from the web form (files and textareas).
*/