<commit_before><?php

/**
 * BreezeUserInfo
 *
 * The purpose of this file is to generate a div with the user common info, name, avatar, post, icons, stuff like that.
 * @package Breeze mod
 * @version 1.0 Beta 3
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2013 <NAME>
 * @license http://www.mozilla.org/MPL/MPL-1.1.html
 */

/*
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is http://missallsunday.com code.
 *
 * The Initial Developer of the Original Code is
 * <NAME>.
 * Portions created by the Initial Developer are Copyright (c) 2012
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 */

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

	/* The purpose of this file is to centralize the user info,
	helps to avoid having to write code over and over again */
class BreezeUserInfo
{
	public static function profile($u)
	{
		global $memberContext, $context;

		// Can't do much if the user id is empty...
		if (empty($u))
			return;

		// An extra check ;)
		if (empty($memberContext[$u]))
			loadMemberContext($u);

		$context['user']['info'] = $memberContext[$u];

		// Set an empty array
		$context['Breeze']['user_info'][$user['id']] = array(
			'facebox' => '',
			'link' => '',
			'data' => '',
			'name' => ''
		);

		// The user must exists!
		if (!isset($user) || empty($user))
			return false;

		else
			template_main();
	}
}<commit_msg>Prepare the source to handle the correct template<commit_after><?php

/**
 * BreezeUserInfo
 *
 * The purpose of this file is to generate a div with the user common info, name, avatar, post, icons, stuff like that.
 * @package Breeze mod
 * @version 1.0 Beta 3
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2013 <NAME>
 * @license http://www.mozilla.org/MPL/MPL-1.1.html
 */

/*
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is http://missallsunday.com code.
 *
 * The Initial Developer of the Original Code is
 * <NAME>.
 * Portions created by the Initial Developer are Copyright (c) 2012
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 */

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

	/* The purpose of this file is to centralize the user info,
	helps to avoid having to write code over and over again */
class BreezeUserInfo
{
	public static function profile($u)
	{
		global $memberContext, $context;

		// Can't do much if the user id is empty...
		if (empty($u))
			return;

		// An extra check ;)
		if (empty($memberContext[$u]))
			loadMemberContext($u);

		// Pass the user data to the template
		$context['user']['info'] = $memberContext[$u];

		loadtemplate(Breeze::$name .'Display');

		// Call the right func and strip the layers
		$context['template_layers'] = array();
		$context['sub_template'] = 'userInfo';

		// Set an empty array to avoid undefined errors when an user no longer exists
		$context['Breeze']['user_info'][$user['id']] = array(
			'facebox' => '',
			'link' => '',
			'data' => '',
			'name' => ''
		);

		// The user must exists!
		if (!isset($user) || empty($user))
			return false;

		else
			template_userInfo();
	}
}
{'fraction_non_alphanumeric': 0.13252714708785784, 'fraction_numerical': 0.00839091806515301, 'mean_word_length': 3.453846153846154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7199707', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1206, 'n_words': 490}