<commit_before><?php
namespace addons\content_cp\terms;


class model extends \addons\content_cp\main\model
{

	public function post_terms()
	{

		$post             = [];
		$post['title']    = \lib\utility::post('title');
		$post['desc']     = \lib\utility::post('desc');
		$post['language'] = \lib\define::get_language();
		$post['slug']     = \lib\utility::post('slug');
		$post['type']     = \lib\utility::get('type');
		$post['status']   = \lib\utility::post('status') ? 'enable' : 'disable' ;

		if(\lib\utility::get('edit'))
		{
			$post['id'] = \lib\utility::get('edit');
			\lib\app\term::edit($post);
		}
		else
		{
			\lib\app\term::add($post);
		}

		if(\lib\debug::$status)
		{
			if(\lib\utility::get('edit'))
			{
				\lib\debug::true(T_("Term successfully edited"));
				$this->redirector($this->url('baseFull'). '/terms');
			}
			else
			{
				\lib\debug::true(T_("Term successfully added"));
				$this->redirector($this->url('full'));
			}
		}
	}
}
?><commit_msg>redirect after update term fix<commit_after><?php
namespace addons\content_cp\terms;


class model extends \addons\content_cp\main\model
{

	public function post_terms()
	{

		$post             = [];
		$post['title']    = \lib\utility::post('title');
		$post['desc']     = \lib\utility::post('desc');
		$post['language'] = \lib\define::get_language();
		$post['slug']     = \lib\utility::post('slug');
		$post['type']     = \lib\utility::get('type');
		$post['status']   = \lib\utility::post('status') ? 'enable' : 'disable' ;

		if(\lib\utility::get('edit'))
		{
			$post['id'] = \lib\utility::get('edit');
			\lib\app\term::edit($post);
		}
		else
		{
			\lib\app\term::add($post);
		}

		if(\lib\debug::$status)
		{
			if(\lib\utility::get('edit'))
			{
				\lib\debug::true(T_("Term successfully edited"));

				$url = $this->url('baseFull'). '/terms';

				if(\lib\utility::get('type'))
				{
					$url .= '?type='. \lib\utility::get('type');
				}

				$this->redirector($url);
			}
			else
			{
				\lib\debug::true(T_("Term successfully added"));
				$this->redirector($this->url('full'));
			}
		}
	}
}
?>
{'fraction_non_alphanumeric': 0.2458233890214797, 'fraction_numerical': 0.0, 'mean_word_length': 3.2515212981744424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3930964', 'n_tokens_mistral': 907, 'n_tokens_neox': 787, 'n_words': 96}