<commit_before><?php
/**
* @version      $Id$
* @category		Koowa
* @package		Koowa_Toolbar
* @subpackage	Button
* @copyright    Copyright (C) 2007 - 2009 <NAME> and <NAME>. All rights reserved.
* @license      GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
*/

/**
 * Cancel button class for a toolbar
 * 
 * @author		<NAME> <<EMAIL>>
 * @category	Koowa
 * @package		Koowa_Toolbar
 * @subpackage	Button
 */
class KToolbarButtonCancel extends KToolbarButtonAbstract
{
	public function getLink()
	{
		$option = KRequest::get('get.option', 'cmd');
		$view	= KInflector::pluralize(KRequest::get('get.view', 'cmd'));
		return 'index.php?option='.$option.'&view='.$view;
	}
}<commit_msg>Cancel action now also extends KToolbarButtonPost to be able to trigger a controller action and handle it accoordingly.<commit_after><?php
/**
* @version      $Id$
* @category		Koowa
* @package		Koowa_Toolbar
* @subpackage	Button
* @copyright    Copyright (C) 2007 - 2009 <NAME> and <NAME>. All rights reserved.
* @license      GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
*/

/**
 * Cancel button class for a toolbar
 * 
 * @author		<NAME> <<EMAIL>>
 * @category	Koowa
 * @package		Koowa_Toolbar
 * @subpackage	Button
 */
class KToolbarButtonCancel extends KToolbarButtonPost
{
	public function __construct(array $options = array())
	{
		parent::__construct($options);
		$this->setField('action', 'cancel');
	}
}
{'fraction_non_alphanumeric': 0.1499302649930265, 'fraction_numerical': 0.015341701534170154, 'mean_word_length': 4.161870503597123, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5825546', 'n_tokens_mistral': 515, 'n_tokens_neox': 490, 'n_words': 122}