<commit_before><?php

/**
 * BreezeTrackActions
 *
 * @package Breeze mod
 * @version 1.1
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2011, 2015, <NAME>
 * @license http://www.mozilla.org/MPL/ MPL 2.0
 */

if (!defined('SMF'))
	die('No direct access...');

class BreezeTrackActions extends Breeze
{
	function __construct()
	{
		parent::__construct();
	}

	public function createTopic(&$msgOptions, &$topicOptions, &$posterOptions)
	{
		// Get the poster's options.
		$options = $this['query']->getUserSettings($posterOptions['id']);

		// Does the user wants to log this? does the new topic has been approved?
		if (!empty($options['alert_topic']) && !empty($topicOptions['is_approved']))
			$this['query']->createLog(array(
				'member' => $posterOptions['id'],
				'content_type' => 'topic',
				'content_id' => $topicOptions['id'],
				'time' => time(),
				'extra' => array(
					'subject' => $msgOptions['subject'],
					'toLoad' => array($posterOptions['id']),),
			));
	}

	public function editProfile(&$profile_vars, &$post_errors, $memID, $cur_profile, $current_area)
	{
	}
}<commit_msg>Need to pass $topicOptions for further visibility checks<commit_after><?php

/**
 * BreezeTrackActions
 *
 * @package Breeze mod
 * @version 1.1
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2011, 2015, <NAME>
 * @license http://www.mozilla.org/MPL/ MPL 2.0
 */

if (!defined('SMF'))
	die('No direct access...');

class BreezeTrackActions extends Breeze
{
	function __construct()
	{
		parent::__construct();
	}

	public function createTopic(&$msgOptions, &$topicOptions, &$posterOptions)
	{
		// Get the poster's options.
		$options = $this['query']->getUserSettings($posterOptions['id']);

		// Does the user wants to log this? does the new topic has been approved?
		if (!empty($options['alert_topic']) && !empty($topicOptions['is_approved']))
			$this['query']->createLog(array(
				'member' => $posterOptions['id'],
				'content_type' => 'topic',
				'content_id' => $topicOptions['id'],
				'time' => time(),
				'extra' => array(
					'subject' => $msgOptions['subject'],
					'toLoad' => array($posterOptions['id']),
					'topicOptions' => $topicOptions),
			));
	}

	public function editProfile(&$profile_vars, &$post_errors, $memID, $cur_profile, $current_area)
	{
	}
}
{'fraction_non_alphanumeric': 0.19076655052264807, 'fraction_numerical': 0.010452961672473868, 'mean_word_length': 4.521634615384615, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 30, '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': '4875611', 'n_tokens_mistral': 868, 'n_tokens_neox': 762, 'n_words': 173}