<commit_before><?php
/**
 * Application model for Cake.
 *
 * This file is application-wide model file. You can put all
 * application-wide model-related methods here.
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.Model
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

App::uses('Model', 'Model');
App::uses('LogableBehavior', 'Assets.models/behaviors');

class AppModel extends Model {

	public $name;

	public function __construct($id = false, $table = null, $ds = null) {
		parent::__construct($id, $table, $ds);

		$this->name = get_class($this);
	}

	// major -> minor -> hotfix -> requires_logout
	public $db_changes = array(
		2 => array(
			4 => array(18 => false, 19 => false, 20 => false, 25 => false, 27 => false, 32 => false, 33 => true, 38 => true, 39 => true, 40 => false, 42 => false, 44 => false, 45 => false, 49 => true, 50 => false)
		)
	);

	// Generic update script
	// add special cases where the upgrade does more than just update the DB
	// this could become useful in the future
	public function updateMISP($command) {
		switch ($command) {
			case '2.4.20':
				$this->updateDatabase($command);
				$this->ShadowAttribute = ClassRegistry::init('ShadowAttribute');
				$this->ShadowAttribute->upgradeToProposalCorrelation();
				break;
			case '2.4.25':<commit_msg>chg: Enabled 2.4.51 db upgrade<commit_after><?php
/**
 * Application model for Cake.
 *
 * This file is application-wide model file. You can put all
 * application-wide model-related methods here.
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.Model
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

App::uses('Model', 'Model');
App::uses('LogableBehavior', 'Assets.models/behaviors');

class AppModel extends Model {

	public $name;

	public function __construct($id = false, $table = null, $ds = null) {
		parent::__construct($id, $table, $ds);

		$this->name = get_class($this);
	}

	// major -> minor -> hotfix -> requires_logout
	public $db_changes = array(
		2 => array(
			4 => array(18 => false, 19 => false, 20 => false, 25 => false, 27 => false, 32 => false, 33 => true, 38 => true, 39 => true, 40 => false, 42 => false, 44 => false, 45 => false, 49 => true, 50 => false, 51 => false)
		)
	);

	// Generic update script
	// add special cases where the upgrade does more than just update the DB
	// this could become useful in the future
	public function updateMISP($command) {
		switch ($command) {
			case '2.4.20':
				$this->updateDatabase($command);
				$this->ShadowAttribute = ClassRegistry::init('ShadowAttribute');
				$this->ShadowAttribute->upgradeToProposalCorrelation();
				break;
			case '2.4.25':
{'fraction_non_alphanumeric': 0.148542600896861, 'fraction_numerical': 0.03531390134529148, 'mean_word_length': 3.540712468193384, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4189114', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1069, 'n_words': 343}