<commit_before><?php
/**
 * Class file for BeFilter
 *
 * Copyright (c) 2009 JadeIT cc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * @license http://www.eclipse.org/legal/epl-v10.html
 * @package Models
 *
 * Contributors:
 * @author <NAME> (JadeIT cc) - initial API and implementation
 *
 * Generated with class_gen on 2009-07-02 20:26:27 
 */

/**
 * DBObject wrapper for the `be_filters` table
 * @package Models
 */
class BEFilterObj extends DBObject {
	function __construct($meta = array()) {
		if (!is_array($meta) && is_numeric($meta)) {
			$meta = array('id' => $meta);
		}
		$meta['table'] = 'b_e_filters';
		$meta['name'] = 'BEFilter';
		$meta['fields'] = array(
			'id' => 'primarykey',
			'name' => 'string',
			'description' => 'text',
			'class' => 'string',
			'function' => 'string',
			'options' => 'string',
			'active' => 'boolean',
			'modified' => 'lastmodified',
			'added' => 'added',
		);
		return parent::__construct($meta);
	}

	function validate($data, $action, $options = array()) {
		$toret = false;
		$data = parent::validate($data, $action, $options);
		if ($data) {
			$toret = true;
		}
		return $toret ? $data : false;
	}
}
<commit_msg>Updated BEFilter validate<commit_after><?php
/**
 * Class file for BeFilter
 *
 * Copyright (c) 2009 JadeIT cc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * @license http://www.eclipse.org/legal/epl-v10.html
 * @package Models
 *
 * Contributors:
 * @author <NAME> (JadeIT cc) - initial API and implementation
 *
 * Generated with class_gen on 2009-07-02 20:26:27 
 */

/**
 * DBObject wrapper for the `be_filters` table
 * @package Models
 */
class BEFilterObj extends DBObject {
	function __construct($meta = array()) {
		if (!is_array($meta) && is_numeric($meta)) {
			$meta = array('id' => $meta);
		}
		$meta['table'] = 'b_e_filters';
		$meta['name'] = 'BEFilter';
		$meta['fields'] = array(
			'id' => 'primarykey',
			'name' => 'string',
			'description' => 'text',
			'class' => 'string',
			'function' => 'string',
			'options' => 'string',
			'active' => 'boolean',
			'modified' => 'lastmodified',
			'added' => 'added',
		);
		return parent::__construct($meta);
	}

	function validate($data, $action, $options = array()) {
		$toret = true;
		$data = parent::validate($data, $action, $options);
		if ($data) {
			$data['active'] = array_key_exists('active', $data) ? $data['active'] : 1;
		}
		return $toret ? $data : false;
	}
}

{'fraction_non_alphanumeric': 0.17478930010993038, 'fraction_numerical': 0.016489556614144377, 'mean_word_length': 3.875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7289531', 'n_tokens_mistral': 1007, 'n_tokens_neox': 899, 'n_words': 253}