function download() { $app = JFactory::getApplication(); $user = JFactory::getUser(); $db = JFactory::getDbo(); $file_id = $app->input->getInt('fid', 0); if (!DJClassifiedsFileHelper::getFile($file_id)) { throw new Exception('', 404); return false; } $app->close(); //return true; }
function download() { require_once JPATH_ROOT . DS . 'plugins' . DS . 'djclassifieds' . DS . 'files' . DS . 'helper.php'; $app = JFactory::getApplication(); $user = JFactory::getUser(); $db = JFactory::getDbo(); $file_id = $app->input->getInt('fid', 0); if (!DJClassifiedsFileHelper::getFile($file_id)) { throw new Exception('', 404); return false; } $app->close(); //return true; }