Hide password custom fields data in agent custom fileds section - #2030

This commit is contained in:
enriquecd 2018-03-13 12:46:27 +01:00
parent af5d70bd7d
commit 753d10920a

View File

@ -78,19 +78,22 @@ else {
$data[1] = html_print_image('images/delete.png', true); $data[1] = html_print_image('images/delete.png', true);
} }
$custom_value = db_get_value_filter('description', $custom_value = db_get_all_rows_sql("select tagent_custom_data.description,tagent_custom_fields.is_password_type from tagent_custom_fields
'tagent_custom_data', array( INNER JOIN tagent_custom_data ON tagent_custom_fields.id_field = tagent_custom_data.id_field where tagent_custom_fields.id_field = ".$field['id_field']." and tagent_custom_data.id_agent = ".$id_agente);
'id_field' => $field['id_field'],
'id_agent' => $id_agente)); if ($custom_value[0]['description'] === false || $custom_value[0]['description'] == '') {
$custom_value[0]['description'] = '<i>-'.__('empty').'-</i>';
if ($custom_value === false || $custom_value == '') {
$custom_value = '<i>-'.__('empty').'-</i>';
} }
else { else {
$custom_value = ui_bbcode_to_html($custom_value); $custom_value[0]['description'] = ui_bbcode_to_html($custom_value[0]['description']);
} }
$data[2] = $custom_value; if($custom_value[0]['is_password_type']){
$data[2] = '&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;';
}
else{
$data[2] = $custom_value[0]['description'];
}
array_push ($table->data, $data); array_push ($table->data, $data);
} }