summaryrefslogtreecommitdiffstats
path: root/application/controllers/file
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-09-26 11:36:48 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-11-05 19:44:15 +0100
commit1027de3579f0ae95b3192431559d8db85c93af3f (patch)
treeb8fa5d91123854c20e10f64d275bbf03b3dcae90 /application/controllers/file
parentabb846aa04807a2eba22785f089115fe33860ca7 (diff)
Remove cli client only functions
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/file')
-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).
*/