public function downloadLog() { $app = JFactory::getApplication(); $fileName = $app->input->get('fileName', '', 'string'); $logPath = $app->get('log_path', JPATH_SITE . '/logs') . '/' . $fileName; if (JFile::exists($logPath)) { $resume = 1; $speed = 500; $downloadResult = JUDirectoryHelper::downloadFile($logPath, 'com_judirectory.importlog.csv', 'php', $speed, $resume); if ($downloadResult !== true) { echo $downloadResult; exit; } } else { echo JText::_('COM_JUDIRECTORY_FILE_NOT_FOUND'); } exit; }