function setUploadData() { // Linkr media manager if (JRequest::getBool('mm', false)) { $tool = JRequest::getCmd('tool', 'badges'); switch ($tool) { case 'badges': $this->returnURL = index . '&view=mm'; $this->uploadFolder = JPATH_COMPONENT_SITE . DS . 'assets' . DS . 'badges'; break; default: // 401 Unauthorized $this->end(401, JText::_('bad request')); } return; } // Default: linking a file from Linkr $this->returnURL = LinkrHelper::getLinkrUrl(JRequest::getCmd('e_name', 'text')); $this->returnURL = str_replace('&', '&', $this->returnURL); if (!($model =& $this->getModel('Request'))) { return $this->end(500, 'Could not load Request model'); } $paths = $model->getFileInfo(); $this->uploadFolder = $paths['path']; }