public function download() { tzportfolioplusimport('phpclass.connection_tools_class'); $model = $this->getModel('Article', 'TZ_Portfolio_PlusModel')->download(); $file = JPATH_ROOT . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . $model; $mainframe = JFactory::getApplication(); if (JFile::exists($file)) { tzConnector::sendfile($file, $this->check_filetype($file)); $mainframe->close(); } return true; }
public function download() { require_once JPATH_COMPONENT_ADMINISTRATOR . '/' . 'libraries' . '/' . 'connectionTools.class.php'; $model = $this->getModel('P_Article', 'TZ_PortfolioModel')->download(); $file = JPATH_ROOT . '/' . 'media' . '/' . $model; $mainframe = JFactory::getApplication(); if (JFile::exists($file)) { tzConnector::sendfile($file, $this->check_filetype($file)); $mainframe->close(); } return true; }