<commit_before><?php
class WikiPage extends AppModel {
	public $validate = array(
        'title' => array(
        	array('rule' => 'notEmpty'),
        	array('rule' => array('custom', '/^[^\\/]*$/u'),'message' => '/はタイトルに使えません.'),
        	array('rule' => 'isUnique','message' => 'このタイトルは既に使われています')
    	)
    );
    public $name = 'WikiPage';
    public $belongsTo = 'Category';

    public function beforeSave($options = array()) {
    	if (isset($this->data[$this->alias]['title'])) {
    		$this->data[$this->alias]['title']=h($this->data[$this->alias]['title']);
    	}
    	return true;
    }
}<commit_msg>add attachment file to WikiPage<commit_after><?php
class WikiPage extends AppModel {
	public $validate = array(
        'title' => array(
        	array('rule' => 'notEmpty'),
        	array('rule' => array('custom', '/^[^\\/]*$/u'),'message' => '/はタイトルに使えません.'),
        	array('rule' => 'isUnique','message' => 'このタイトルは既に使われています')
    	)
    );
    public $name = 'WikiPage';
    public $belongsTo = 'Category';
    public $hasMany = 'Attachment';

    public function beforeSave($options = array()) {
    	if (isset($this->data[$this->alias]['title'])) {
    		$this->data[$this->alias]['title']=h($this->data[$this->alias]['title']);
    	}
    	return true;
    }
}
{'fraction_non_alphanumeric': 0.22317262830482115, 'fraction_numerical': 0.0, 'mean_word_length': 3.192182410423453, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '78171', 'n_tokens_mistral': 463, 'n_tokens_neox': 443, 'n_words': 75}