<commit_before><?

$access_zone = $sub0;
if($access_zone)
    $zone = sql::row("ks_access_zones", compact('access_zone'));


if($action == "zone_manage") try {
    $data = array(
        'access_zone'         => $_POST['access_zone'],
        'access_zone_parent'  => $_POST['access_zone_parent'],
        'zone_descr'          => rte_clean($_POST['zone_descr']),
    );

    if(!$data['access_zone_parent']) //si la zone est racine
        $data['access_zone_parent'] = $data['access_zone'];

    if(!$zone){
        if(sql::row("ks_access_zones", array('access_zone'=>$data['access_zone'])))
            throw rbx::error("Une zone du meme nom existe deja.");

        $res = sql::insert("ks_access_zones", $data);
        if(!$res)
            throw rbx::error("&err_sql;");


        rbx::ok("Une nouvelle zone {$data['access_zone']} a été créée");
        jsx::js_eval("Jsx.open('/?$href_fold/list', 'access_zone_box',this)");
        jsx::$rbx = false;
    } else {

        sql::replace("ks_access_zones", $data, compact('access_zone'));

        rbx::ok("Modification enregistrées");
        jsx::js_eval(jsx::PARENT_RELOAD);

    }

}catch(rbx $e){rbx::error("Impossible de proceder à l'enregistrement de la zone.");}


<commit_msg>Fix users access zone comment description<commit_after><?

$access_zone = $sub0;
if($access_zone)
    $zone = sql::row("ks_access_zones", compact('access_zone'));


if($action == "zone_manage") try {
    $data = array(
        'access_zone'         => $_POST['access_zone'],
        'access_zone_parent'  => $_POST['access_zone_parent'],
        'zone_descr'          => $_POST['zone_descr'],
    );

    if(!$data['access_zone_parent']) //si la zone est racine
        $data['access_zone_parent'] = $data['access_zone'];

    if(!$zone){
        if(sql::row("ks_access_zones", array('access_zone'=>$data['access_zone'])))
            throw rbx::error("Une zone du meme nom existe deja.");

        $res = sql::insert("ks_access_zones", $data);
        if(!$res)
            throw rbx::error("&err_sql;");


        rbx::ok("Une nouvelle zone {$data['access_zone']} a été créée");
        jsx::js_eval("Jsx.open('/?$href_fold/list', 'access_zone_box',this)");
        jsx::$rbx = false;
    } else {

        sql::replace("ks_access_zones", $data, compact('access_zone'));

        rbx::ok("Modification enregistrées");
        jsx::js_eval(jsx::PARENT_RELOAD);

    }

}catch(rbx $e){rbx::error("Impossible de proceder à l'enregistrement de la zone.");}



{'fraction_non_alphanumeric': 0.18742490989187024, 'fraction_numerical': 0.0008009611533840609, 'mean_word_length': 3.4134275618374557, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6329401', 'n_tokens_mistral': 873, 'n_tokens_neox': 863, 'n_words': 145}