<commit_before><?php
namespace addons\content_cp\posts\edit;

class view extends \addons\content_cp\posts\main\view
{
	public function config()
	{
		parent::config();

		$id = \lib\utility::get('id');

		$detail = \lib\app\posts::get($id);
		if(!$detail)
		{
			\lib\error::access(T_("Invalid id"));
		}

		$this->data->dataRaw = $detail;
		$this->data->cat_list = \lib\app\term::cat_list();
	}
}
?><commit_msg>change edit view<commit_after><?php
namespace addons\content_cp\posts\edit;

class view extends \addons\content_cp\posts\main\view
{
	public function config()
	{
		parent::config();

		$id = \lib\utility::get('id');

		$detail = \lib\app\posts::get($id);
		if(!$detail)
		{
			\lib\error::access(T_("Invalid id"));
		}

		$this->data->dataRaw = $detail;
		$this->data->cat_list = \lib\app\term::cat_list();



		$this->data->page['title'] = T_("Edit post");
		$this->data->page['desc']  = T_("You can change everything, change url and add gallery or some other change");

		$this->data->page['badge']['link'] = $this->data->modulePath. $this->data->moduleType;
		$this->data->page['badge']['text'] = T_('Back to list of posts');

		$myType = \lib\utility::get('type');
		if($myType)
		{
			switch ($myType)
			{
				case 'page':
					$this->data->page['title'] = T_('Edit page');
					$this->data->page['badge']['text'] = T_('Back to list of pages');
					break;
			}
		}

	}
}
?>
{'fraction_non_alphanumeric': 0.22358015815959742, 'fraction_numerical': 0.0, 'mean_word_length': 3.8501742160278747, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '2632453', 'n_tokens_mistral': 578, 'n_tokens_neox': 519, 'n_words': 89}