コード例 #1
0
ファイル: controller.php プロジェクト: JKoelman/JEM-3
 /**
  * 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();
 }
コード例 #2
0
ファイル: controller.php プロジェクト: BillVGN/PortalPRP
	/**
	 * 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();
	}