<commit_before><?php

/**
 * @package Ultimate Menu mod
 * @version 1.0.3
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2014, <NAME>
 * @license http://opensource.org/licenses/MIT MIT
 */

if (!defined('SMF'))
	die('Hacking attempt...');

function um_load_menu(&$menu_buttons)
{
	global $smcFunc, $user_info, $scripturl, $context, $modSettings;

	// Make damn sure we ALWAYS losd last. Priority: 100!
	$hooks = explode(',', $modSettings['integrate_menu_buttons']);
	$hook = end($hooks);
	if (strpos($hook, 'um_load_menu') !== false)
	{
		remove_integration_function('integrate_menu_buttons', 'um_load_menu');
		add_integration_function('integrate_menu_buttons', 'um_load_menu');
	}

	$db_buttons = @unserialize($modSettings['um_menu']);

	if (empty($db_buttons))
		return $menu_buttons;<commit_msg>fix: code to check integration was backwards<commit_after><?php

/**
 * @package Ultimate Menu mod
 * @version 1.0.3
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) 2014, <NAME>
 * @license http://opensource.org/licenses/MIT MIT
 */

if (!defined('SMF'))
	die('Hacking attempt...');

function um_load_menu(&$menu_buttons)
{
	global $smcFunc, $user_info, $scripturl, $context, $modSettings;

	// Make damn sure we ALWAYS losd last. Priority: 100!
	$hooks = explode(',', $modSettings['integrate_menu_buttons']);
	$hook = end($hooks);
	if (strpos($hook, 'um_load_menu') === false)
	{
		remove_integration_function('integrate_menu_buttons', 'um_load_menu');
		add_integration_function('integrate_menu_buttons', 'um_load_menu');
	}

	$db_buttons = @unserialize($modSettings['um_menu']);

	if (empty($db_buttons))
		return $menu_buttons;
{'fraction_non_alphanumeric': 0.17182756527018822, 'fraction_numerical': 0.012143290831815421, 'mean_word_length': 5.953586497890296, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3363684', 'n_tokens_mistral': 602, 'n_tokens_neox': 568, 'n_words': 121}