From cdbb70f3b92a4bed1b9ff38aa0add47768057564 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Apr 2017 13:09:56 +0200 Subject: [PATCH] take out method addAttachments() --- controllers/class.AddDocument.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index ab4271104..e87d22c99 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -22,33 +22,6 @@ */ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { - protected function addAttachments($document) { /* {{{ */ - $user = $this->params['user']; - $settings = $this->params['settings']; - /* Check for attachments */ - for ($attach_num=0;$attach_num $folder->getName())),getMLText("uploading_zerosize")); - } - if ($_FILES['attachment']['error'][$attach_num]!=0){ -// UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); - } - - $attachfiletmp = $_FILES["attachment"]["tmp_name"][$attach_num]; - $attachfiletype = $_FILES["attachment"]["type"][$attach_num]; - $attachfilename = $_FILES["attachment"]["name"][$attach_num]; - - $fileType = ".".pathinfo($attachfilename, PATHINFO_EXTENSION); - - if($settings->_overrideMimeType) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $attachfiletype = finfo_file($finfo, $attachfiletmp); - } - - $res = $document->addDocumentFile(utf8_basename($attachfilename), '', $user, $attachfiletmp, utf8_basename($attachfilename),$fileType, $attachfiletype); - } - } /* }}} */ - public function run() { /* {{{ */ $name = $this->getParam('name'); $comment = $this->getParam('comment');