<commit_before><?php
$tr_class = '';
if (empty($context)) {
    $context = 'event';
}
if ($event['Event']['id'] != $object['event_id']) {
    if (!$isSiteAdmin && $event['extensionEvents'][$object['event_id']]['Orgc']['id'] != $me['org_id']) {
        $mayModify = false;
    }
}
$editScope = ($isSiteAdmin || $mayModify) ? 'Attribute' : 'ShadowAttribute';
if (!empty($child)) {
    if ($child === 'last' && empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableHighlightBorderBottom borderBlue';
    } else {
        $tr_class .= ' tableHighlightBorderCenter borderBlue';
    }
    if (!empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableInsetOrangeFirst';
    }
} else {
    $child = false;
    if (!empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableHighlightBorderTop borderOrange';
    }
}
if (!empty($object['deleted'])) {
    $tr_class .= ' deleted-attribute';
}
if (!empty($k)) {
    $tr_class .= ' row_' . h($k);
}

$objectId = (int) $object['id'];

$quickEdit = function($fieldName) use ($mayModify, $object) {
    if (!$mayModify) {
        return ''; // currently it is not supported to create proposals trough quick edit
    }
    if ($object['deleted']) {
        return ''; // deleted attributes are not editable
    }
    if ($fieldName === 'value' && ($object['type'] === 'attachment' || $object['type'] === 'malware-sample')) {
        return '';
    }
    return " data-edit-field=\"$fieldName\"";
}

?>
<tr id="Attribute_<?= $objectId ?>_tr" data-primary-id="<?= $objectId ?>" class="<?php echo $tr_class; ?>" tabindex="0">
    <?php if (($mayModify || !empty($extended)) && empty($disable_multi_select)): ?>
      <td style="width:10px">
      <?php if ($mayModify):?>
          <input class="select_attribute" type="checkbox" data-id="<?= $objectId ?>" aria-label="<?php echo __('Select attribute');?>">
      <?php endif; ?>
      </td>
    <?php endif; ?>
    <td class="short context hidden"><?= $objectId ?></td>
    <td class="short context hidden uuid quickSelect"><?php echo h($object['uuid']); ?></td><commit_msg>fix: [UI] Do not allow to edit attachment attribute type<commit_after><?php
$tr_class = '';
if (empty($context)) {
    $context = 'event';
}
if ($event['Event']['id'] != $object['event_id']) {
    if (!$isSiteAdmin && $event['extensionEvents'][$object['event_id']]['Orgc']['id'] != $me['org_id']) {
        $mayModify = false;
    }
}
$editScope = ($isSiteAdmin || $mayModify) ? 'Attribute' : 'ShadowAttribute';
if (!empty($child)) {
    if ($child === 'last' && empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableHighlightBorderBottom borderBlue';
    } else {
        $tr_class .= ' tableHighlightBorderCenter borderBlue';
    }
    if (!empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableInsetOrangeFirst';
    }
} else {
    $child = false;
    if (!empty($object['ShadowAttribute'])) {
        $tr_class .= ' tableHighlightBorderTop borderOrange';
    }
}
if (!empty($object['deleted'])) {
    $tr_class .= ' deleted-attribute';
}
if (!empty($k)) {
    $tr_class .= ' row_' . h($k);
}

$objectId = (int) $object['id'];

$quickEdit = function($fieldName) use ($mayModify, $object) {
    if (!$mayModify) {
        return ''; // currently it is not supported to create proposals trough quick edit
    }
    if ($object['deleted']) {
        return ''; // deleted attributes are not editable
    }
    if (($fieldName === 'value' || $fieldName === 'type') && ($object['type'] === 'attachment' || $object['type'] === 'malware-sample')) {
        return '';
    }
    return " data-edit-field=\"$fieldName\"";
}

?>
<tr id="Attribute_<?= $objectId ?>_tr" data-primary-id="<?= $objectId ?>" class="<?php echo $tr_class; ?>" tabindex="0">
    <?php if (($mayModify || !empty($extended)) && empty($disable_multi_select)): ?>
      <td style="width:10px">
      <?php if ($mayModify):?>
          <input class="select_attribute" type="checkbox" data-id="<?= $objectId ?>" aria-label="<?php echo __('Select attribute');?>">
      <?php endif; ?>
      </td>
    <?php endif; ?>
    <td class="short context hidden"><?= $objectId ?></td>
    <td class="short context hidden uuid quickSelect"><?php echo h($object['uuid']); ?></td>
{'fraction_non_alphanumeric': 0.22083136513934815, 'fraction_numerical': 0.0014170996693434106, 'mean_word_length': 3.7160356347438754, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '7383521', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1348, 'n_words': 296}