<commit_before><?php
//Verifications
if(!defined("_INDEX_")) exit;
if(!can_d(DROIT_PLAY))
	$_tpl->set("need_to_be_loged",true); 
else {
    
$mbr = new member($_user['mid']);

require_once("lib/btc.lib.php");
require_once("lib/src.lib.php");
require_once("lib/unt.lib.php");
require_once("lib/res.lib.php");
require_once("lib/trn.lib.php");
require_once("lib/member.lib.php");

// construction des batiments
if($_act == 'btc')
{
	$_tpl->set("module_tpl","modules/btc/btc.tpl");

	/* Nombre de travailleurs */
	$_tpl->set("btc_trav", $mbr->nb_unt_done(1));
	$_tpl->set("btc_act",false);

	// tous les batiments
	$cache['btc_done'] = get_nb_btc($_user['mid']); // get_nb_btc_done($_user['mid']);
	// seulement les batiments en construction
    /* le cache est $mbr
	$cache['btc_todo'] = get_nb_btc($_user['mid'], array(), array(BTC_ETAT_TODO));
	$cache['src'] = get_src_done($_user['mid']);
	$cache['src'] = index_array($cache['src'], "src_type");
	$cache['res'] = clean_array_res(get_res_done($_user['mid']));
	$cache['res'] = $cache['res'][0];
	$cache['trn'] = clean_array_trn(get_trn($_user['mid']));
	$cache['trn'] = $cache['trn'][0];
	$cache['unt'] = get_unt_done($_user['mid']);
	$cache['unt'] = index_array($cache['unt'], "unt_type");
    */
    
	if($_sub == 'btc') {// construire un nouveau bâtiment $type
		$_tpl->set("btc_act","btc");
		$type = request("type", "uint", "get");
		
		$btc_todo = $mbr->nb_btc(array(), array(BTC_ETAT_TODO)); // $cache['btc_todo'];
		$btc_nb = 0;
		foreach($btc_todo as $btc_type)<commit_msg>bug de la construction des batiments<commit_after><?php
//Verifications
if(!defined("_INDEX_")) exit;
if(!can_d(DROIT_PLAY))
	$_tpl->set("need_to_be_loged",true); 
else {
    
$mbr = new member($_user['mid']);

require_once("lib/btc.lib.php");
require_once("lib/src.lib.php");
require_once("lib/unt.lib.php");
require_once("lib/res.lib.php");
require_once("lib/trn.lib.php");
require_once("lib/member.lib.php");

// construction des batiments
if($_act == 'btc')
{
	$_tpl->set("module_tpl","modules/btc/btc.tpl");

	/* Nombre de travailleurs */
	$_tpl->set("btc_trav", $mbr->nb_unt_done(1));
	$_tpl->set("btc_act",false);

	// tous les batiments constuits - sauf les BTC_ETAT_TODO
	$cache['btc_done'] = get_nb_btc_done($_user['mid']); // get_nb_btc_done($_user['mid']);
    
	if($_sub == 'btc') {// construire un nouveau bâtiment $type
		$_tpl->set("btc_act","btc");
		$type = request("type", "uint", "get");
		
		$btc_todo = $mbr->nb_btc(array(), array(BTC_ETAT_TODO)); // $cache['btc_todo'];
		$btc_nb = 0;
		foreach($btc_todo as $btc_type)
{'fraction_non_alphanumeric': 0.23561430793157076, 'fraction_numerical': 0.0023328149300155523, 'mean_word_length': 5.898123324396783, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3360130', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1067, 'n_words': 149}