From 00c600799d074ee9f52cf8e788cf6ff588b89e39 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 15 Feb 2015 17:28:46 +0100 Subject: c/f/do_upload: simpilfy multipaste creation Signed-off-by: Florian Pritz --- application/controllers/file.php | 13 +------------ 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3-24-g4f1b