english/administrator/components/com_menus/controllers/item.php
/**
	 * Method to cancel an edit
	 *
	 * Checks the item in, sets item ID in the session to null, and then redirects to the list page.
	 *
	 * @return	void
	 * @since	1.6
	 */
Method to cancel an edit
Checks the item in, sets item ID in the session to null, and then redirects to the list page.


Method to cancel an edit Checks the item in sets item ID in the session to null and then redirects to the list page .
public function cancel($key = null)
	{
		JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
		$app		= JFactory::getApplication();
		$context	= 'com_menus.edit.item';
		$result		= parent::cancel();
		if ($result) {
			$app->setUserState($context.'.type',	null);
			$app->setUserState($context.'.link',	null);
		}
	}
public function cancel ( $ key = null ) { JRequest :: checkToken ( ) or jexit ( JText :: _ ( 'JINVALID_TOKEN' ) ) ; $ app = JFactory :: getApplication ( ) ; $ context = 'com_menus.edit.item' ; $ result = parent :: cancel ( ) ; if ( $ result ) { $ app -> setUserState ( $ context . '.type' , null ) ; $ app -> setUserState ( $ context . '.link' , null ) ; } }
Method to cancel an edit
 Checks the item in, sets item ID in the session to null, and then redirects to the list page.
Method to cancel an edit Checks the item in sets item ID in the session to null and then redirects to the list page .
// Initialise variables. // Clear the ancillary data from the session.