<commit_before><?php
/**
 * Copyright 2010 - 2012, Cake Development Corporation (http://cakedc.com)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2010 - 2012, Cake Development Corporation (http://cakedc.com)
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

class ConfigsController extends ConfigAppController {

/**
 * Name
 *
 * @var string
 * @access public
 */
	public $name = 'Configs';

/**
 * Models to load
 *
 * @var array
 * @access public
 */
	public $uses = array('Config.Config');

/**
 * Main admininstrative settings
 *
 * @return void
 * @access public
 */
	public function admin_index() {
		if (!empty($this->data)) {
			if ($this->Config->write($this->data)) {
				$this->Session->setFlash(__('Configuration saved'));
			} else {
				$this->Session->setFlash(__('Could not save configuration'));
			}
		} else {
			$this->data['Config'] = Configure::read('AppConfig');
		}
	}

/**
 * Edit existing settings section
 *
 * @return void
 * @access public
 */
	public function admin_edit($section = null) {
		$plugin = null;
		if (isset($this->params['named']['plugin'])) {
			$plugin = $this->params['named']['plugin'];
		}

		if (!empty($this->data)) {
			if ($this->Config->write($this->data)) {
				$this->Session->setFlash(__('Configuration saved'));
			} else {
				$this->Session->setFlash(__('Could not save configuration'));
			}
		} else {
			$this->data['Config'] = $this->Config->readFileAsArray();
		}

		if (!empty($plugin)) {
			$this->viewPath = CakePlugin::path($plugin) . 'View' . DS . 'configs' . DS;
		}

		$this->render($section);
	}

}<commit_msg>Upgrading request<commit_after><?php
/**
 * Copyright 2010 - 2012, Cake Development Corporation (http://cakedc.com)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2010 - 2012, Cake Development Corporation (http://cakedc.com)
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

class ConfigsController extends ConfigAppController {

/**
 * Name
 *
 * @var string
 * @access public
 */
	public $name = 'Configs';

/**
 * Models to load
 *
 * @var array
 * @access public
 */
	public $uses = array('Config.Config');

/**
 * Main admininstrative settings
 *
 * @return void
 * @access public
 */
	public function admin_index() {
		if (!empty($this->request->data)) {
			if ($this->Config->write($this->request->data)) {
				$this->Session->setFlash(__('Configuration saved'));
			} else {
				$this->Session->setFlash(__('Could not save configuration'));
			}
		} else {
			$this->request->data['Config'] = Configure::read('AppConfig');
		}
	}

/**
 * Edit existing settings section
 *
 * @return void
 * @access public
 */
	public function admin_edit($section = null) {
		$plugin = null;
		if (isset($this->request->params['named']['plugin'])) {
			$plugin = $this->request->params['named']['plugin'];
		}

		if (!empty($this->request->data)) {
			if ($this->Config->write($this->request->data)) {
				$this->Session->setFlash(__('Configuration saved'));
			} else {
				$this->Session->setFlash(__('Could not save configuration'));
			}
		} else {
			$this->request->data['Config'] = $this->Config->readFileAsArray();
		}

		if (!empty($plugin)) {
			$this->viewPath = CakePlugin::path($plugin) . 'View' . DS . 'configs' . DS;
		}

		$this->render($section);
	}

}
{'fraction_non_alphanumeric': 0.18746405980448533, 'fraction_numerical': 0.009200690051753882, 'mean_word_length': 3.739782016348774, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4129227', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1068, 'n_words': 243}