<commit_before><?php
/**
 * Created by PhpStorm.
 * User: jjes
 * Date: 2016/11/4
 * Time: 下午 04:02
 */
    include '../../../../mainfile.php';

    $update_data = array_map("addslashes",
        array_map("htmlspecialchars", $_POST));

    if(isset($update_data['update_id']) &&
        strlen( $update_data["name"]) &&
        strlen($update_data["amount"]) &&
        intval($update_data["amount"]) > 0 &&
        intval($update_data["amount"]) > 0
    ){

        $update_name = $update_data["name"];
        $update_amount = $update_data["amount"];
        $update_id = $update_data['update_id'];
        $owner = $xoopsUser->uname();
        $sql = sprintf("UPDATE `%s` SET `name`='{$update_name}', `amount`={$update_amount} WHERE `id`={$update_id} and `owner`={$owner}" ,
            $xoopsDB->prefix('equipment_desc')
        );
        $xoopsDB->queryF($sql);
        header('location:../manage.php');
    }<commit_msg>fix update bug<commit_after><?php
/**
 * Created by PhpStorm.
 * User: jjes
 * Date: 2016/11/4
 * Time: 下午 04:02
 */
    include '../../../../mainfile.php';

    $update_data = array_map("addslashes",
        array_map("htmlspecialchars", $_POST));

    if(isset($update_data['update_id']) &&
        strlen( $update_data["name"]) &&
        strlen($update_data["amount"]) &&
        intval($update_data["amount"]) > 0 &&
        intval($update_data["amount"]) > 0
    ){

        $update_name = $update_data["name"];
        $update_amount = $update_data["amount"];
        $update_id = $update_data['update_id'];
        $owner = $xoopsUser->uname();
        $sql = sprintf("UPDATE `%s` SET `name`='{$update_name}', `amount`={$update_amount} WHERE `id`={$update_id} and `owner`='{$owner}'" ,
            $xoopsDB->prefix('equipment_desc')
        );
        $xoopsDB->queryF($sql);
        header('location:../manage.php');
    }
{'fraction_non_alphanumeric': 0.2097902097902098, 'fraction_numerical': 0.013986013986013986, 'mean_word_length': 2.9157894736842107, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6572826', 'n_tokens_mistral': 646, 'n_tokens_neox': 630, 'n_words': 94}