<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");

Loader::library('mail/importer');

class DashboardSettingsMailController extends Controller {
	protected $sendUndefinedTasksToView = false;
	public function on_start() {
		$this->set('importers', MailImporter::getList());
		$subnav = array(
			array(View::url('/dashboard/settings'), t('General')),
			array(View::url('/dashboard/settings/mail'), t('Email'), true),
			array(View::url('/dashboard/settings', 'set_permissions'), t('Access')),
			array(View::url('/dashboard/settings', 'set_developer'), t('Debug')),
			array(View::url('/dashboard/settings', 'manage_attribute_types'), t('Attributes'))
		);
		$this->set('subnav', $subnav);
	}

	public function edit_importer($miID = false) {
		$this->set('form', Loader::helper('form'));
		$this->set('mi', MailImporter::getByID($miID));
	}
	
	public function save_importer() {
		$miID = $this->post('miID');
		$mi = MailImporter::getByID($miID);
		if (is_object($mi)) {
			$mi->update($this->post());
			$this->redirect('/dashboard/settings/mail', 'importer_updated');
		}
	}
	
	public function importer_updated() {
		$this->set('message', t('Importer saved.'));
	}
	
	public function settings_updated() {
		$this->set("message", t('Global mail settings saved.'));<commit_msg>mail multilingual<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");

Loader::library('mail/importer');

class DashboardSettingsMailController extends Controller {
	protected $sendUndefinedTasksToView = false;
	public function on_start() {
		$this->set('importers', MailImporter::getList());
		$subnav = array(
			array(View::url('/dashboard/settings'), t('General')),
			array(View::url('/dashboard/settings/mail'), t('Email'), true),
			array(View::url('/dashboard/settings', 'set_permissions'), t('Access')),
                        array(View::url('/dashboard/settings/multilingual'), t('Multilingual')),
			array(View::url('/dashboard/settings', 'set_developer'), t('Debug')),
			array(View::url('/dashboard/settings', 'manage_attribute_types'), t('Attributes'))
		);
		$this->set('subnav', $subnav);
	}

	public function edit_importer($miID = false) {
		$this->set('form', Loader::helper('form'));
		$this->set('mi', MailImporter::getByID($miID));
	}
	
	public function save_importer() {
		$miID = $this->post('miID');
		$mi = MailImporter::getByID($miID);
		if (is_object($mi)) {
			$mi->update($this->post());
			$this->redirect('/dashboard/settings/mail', 'importer_updated');
		}
	}
	
	public function importer_updated() {
		$this->set('message', t('Importer saved.'));
	}
	
	public function settings_updated() {
		$this->set("message", t('Global mail settings saved.'));
{'fraction_non_alphanumeric': 0.20952735392631186, 'fraction_numerical': 0.000744324525493115, 'mean_word_length': 5.910025706940874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2768509', 'n_tokens_mistral': 928, 'n_tokens_neox': 866, 'n_words': 142}