<commit_before><?php
// (c) Copyright 2002-2017 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
  header("location: index.php");
  exit;
}

/**
 * @return array
 */
function module_xmpp_info()
{
	return array(
		'description' => tra('Hold a chat session using ConverseJS XMPP client.'),
		'name' => tra('XMPP'),
		'params' => array(),
		'prefs' => array('xmpp_feature'),
		'title' => tra('XMPP'),
		'type' => 'function'
	);
}

/**
 * @param $mod_reference
 * @param $module_params
 */
function module_xmpp($mod_reference, &$module_params)
{
	global $user;
	$xmpplib = TikiLib::lib('xmpp');
	$smarty = TikiLib::lib('smarty');

	$xmpp = array(
		'server_http_bind' => $xmpplib->server_http_bind,
		'user_jid' => $xmpplib->get_user_jid($user)
	);
	
	$smarty->assign('xmpp', $xmpp);
}<commit_msg>[FIX] conversejs: make module description more understandable, thanks chealer<commit_after><?php
// (c) Copyright 2002-2017 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
  header("location: index.php");
  exit;
}

/**
 * @return array
 */
function module_xmpp_info()
{
	return array(
		'description' => tra('Hold a chat session using XMPP (uses the ConverseJS client).'),
		'name' => tra('XMPP'),
		'params' => array(),
		'prefs' => array('xmpp_feature'),
		'title' => tra('XMPP'),
		'type' => 'function'
	);
}

/**
 * @param $mod_reference
 * @param $module_params
 */
function module_xmpp($mod_reference, &$module_params)
{
	global $user;
	$xmpplib = TikiLib::lib('xmpp');
	$smarty = TikiLib::lib('smarty');

	$xmpp = array(
		'server_http_bind' => $xmpplib->server_http_bind,
		'user_jid' => $xmpplib->get_user_jid($user)
	);
	
	$smarty->assign('xmpp', $xmpp);
}
{'fraction_non_alphanumeric': 0.1751959428307976, 'fraction_numerical': 0.007376671277086215, 'mean_word_length': 4.607235142118863, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7428685', 'n_tokens_mistral': 836, 'n_tokens_neox': 783, 'n_words': 194}