/** * Delete attachment * * @return true on sucess * @access private * * Views: * event, venue * * Reference to the task is located in the attachments.js * */ function ajaxattachremove() { $id = JFactory::getApplication()->input->request->getInt('id', 0); $res = JEMAttachment::remove($id); if (!$res) { echo 0; jexit(); } $cache = JFactory::getCache('com_jem'); $cache->clean(); echo 1; jexit(); }
/** * Delete attachment * * @return true on sucess * @access private * */ function ajaxattachremove() { $id = JFactory::getApplication()->input->getInt('id', 0); $res = JEMAttachment::remove($id); if (!$res) { echo 0; // The caller expects an answer! jexit(); } $cache = JFactory::getCache('com_jem'); $cache->clean(); echo 1; // The caller expects an answer! jexit(); }