summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-15 17:28:46 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-15 17:28:46 +0100
commit00c600799d074ee9f52cf8e788cf6ff588b89e39 (patch)
tree3a544846c873cb6b9e936a0079a6c11f09e60132 /application
parentd782a261e2b6466348a6dfc040fac24a3937e174 (diff)
c/f/do_upload: simpilfy multipaste creation
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/controllers/file.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index fa34ecba9..fd7eb9962 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -813,18 +813,7 @@ class File extends MY_Controller {
}
if ($multipaste !== false) {
- $multipaste_url_id = $this->mmultipaste->new_id($limits[0], $limits[1]);
-
- $multipaste_id = $this->mmultipaste->get_multipaste_id($multipaste_url_id);
- assert($multipaste_id !== false);
-
- foreach ($ids as $id) {
- $this->db->insert("multipaste_file_map", array(
- "file_url_id" => $id,
- "multipaste_id" => $multipaste_id,
- ));
- }
- $ids[] = $multipaste_url_id;
+ $ids[] = \service\files::create_multipaste($ids, $userid, $limits)["url_id"];
}
$this->_show_url($ids, $extension);