function fetchMethodForm($uid, $step, $update)
 {
     global $task;
     switch ($step) {
         case 2:
             $lists = array();
             $lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
             return HTML_DMUploadMethod::uploadFileForm($lists);
             break;
         case 3:
             //upload file
             $file = JRequest::getVar('upload', array(), 'files', 'array');
             $err = DMUploadMethod::uploadFileProcess($uid, $step, $file);
             if ($err['_error']) {
                 _returnTo($task, $err['_errmsg'], '', array('step' => $step - 1, 'method' => 'http'));
             }
             $catid = $update ? 0 : $uid;
             $docid = $update ? $uid : 0;
             $session = JFactory::getSession();
             $session->set('docman.dmfilename', $file->name);
             $session->set('docman.document_url', null);
             return fetchEditDocumentForm($docid, $file->name, $catid);
             break;
         default:
             break;
     }
     return true;
 }
Example #2
0
 function fetchMethodForm($uid, $step, $update)
 {
     global $task;
     switch ($step) {
         case 2:
             $lists = array();
             $lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
             return HTML_DMUploadMethod::uploadFileForm($lists);
             break;
         case 3:
             //upload file
             //$file = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
             $file_upload = mosGetParam($_FILES, 'upload');
             $err = DMUploadMethod::uploadFileProcess($uid, $step, $file);
             if ($err['_error']) {
                 _returnTo($task, $err['_errmsg'], '', array('step' => $step - 1, 'method' => 'http'));
             }
             $catid = $update ? 0 : $uid;
             $docid = $update ? $uid : 0;
             return fetchEditDocumentForm($docid, $file->name, $catid);
             break;
         default:
             break;
     }
     return true;
 }