<commit_before><?php defined('BASEPATH') or exit('No direct script access allowed');

/**
 * PyroChunks Admin Controller Class
 *
 * @package  PyroCMS
 * @subpackage  PyroChunks
 * @category  Controller
 * @author  <NAME>
 */ 
class Admin extends Admin_Controller {

	protected $chunk_rules = array(
								array(
									'field' => 'name',
									'label' => 'lang:chunks.chunk_name',
									'rules' => 'trim|required|max_length[60]'
								),
								array(
									'field' => 'slug',
									'label' => 'lang:chunks.chunk_slug',
									'rules' => 'trim|required|strtolower|max_length[60]'
								),
								array(
									'field' => 'type',
									'label' => 'lang:chunks.chunk_type',
									'rules' => 'trim'
								),
								array(
									'field' => 'content',
									'label' => 'lang:chunks.chunk_content',
									'rules' => 'trim|required'
								)
	);
	protected $chunk_types = array(
								'text' 	=> 'Text',
								'html'	=> 'HTML'
							);

	// --------------------------------------------------------------------------

	public function __construct()
	{
		parent::Admin_Controller();
		
		$this->load->model('chunks_m');
		
		$this->load->language('chunks');
		
		$this->template->chunk_types = $this->chunk_types;
		
		$this->template->set_partial('shortcuts', 'admin/shortcuts');
	}

	// --------------------------------------------------------------------------
	// CRUD Functions
	// --------------------------------------------------------------------------

	public function index()<commit_msg>Adding 'WYSIWYG' to the chunk types.<commit_after><?php defined('BASEPATH') or exit('No direct script access allowed');

/**
 * PyroChunks Admin Controller Class
 *
 * @package  PyroCMS
 * @subpackage  PyroChunks
 * @category  Controller
 * @author  <NAME>
 */ 
class Admin extends Admin_Controller {

	protected $chunk_rules = array(
								array(
									'field' => 'name',
									'label' => 'lang:chunks.chunk_name',
									'rules' => 'trim|required|max_length[60]'
								),
								array(
									'field' => 'slug',
									'label' => 'lang:chunks.chunk_slug',
									'rules' => 'trim|required|strtolower|max_length[60]'
								),
								array(
									'field' => 'type',
									'label' => 'lang:chunks.chunk_type',
									'rules' => 'trim'
								),
								array(
									'field' => 'content',
									'label' => 'lang:chunks.chunk_content',
									'rules' => 'trim|required'
								)
	);
	protected $chunk_types = array(
								'wysiwyg' 	=> 'WYSIWYG',
								'text' 		=> 'Text',
								'html'		=> 'HTML'
							);

	// --------------------------------------------------------------------------

	public function __construct()
	{
		parent::Admin_Controller();
		
		$this->load->model('chunks_m');
		
		$this->load->language('chunks');
		
		$this->template->chunk_types = $this->chunk_types;
		
		$this->template->set_partial('shortcuts', 'admin/shortcuts');
	}

	// --------------------------------------------------------------------------
	// CRUD Functions
	// --------------------------------------------------------------------------

	public function index()
{'fraction_non_alphanumeric': 0.289171974522293, 'fraction_numerical': 0.0025477707006369425, 'mean_word_length': 1.53102336825141, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 52, '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': '788129', 'n_tokens_mistral': 1290, 'n_tokens_neox': 882, 'n_words': 160}