mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Remove logging comments as its implied in admin also if returning 1 field for logging use getFieldById Function
This commit is contained in:
@@ -16,7 +16,6 @@ if(isset($_POST['create_custom_field'])){
|
||||
|
||||
$custom_field_id = mysqli_insert_id($mysqli);
|
||||
|
||||
// Logging
|
||||
logAction("Custom Field", "Create", "$session_name created custom field $label", 0, $custom_field_id);
|
||||
|
||||
flash_alert("Custom field <strong>$label</strong> created");
|
||||
@@ -33,7 +32,6 @@ if(isset($_POST['edit_custom_field'])){
|
||||
|
||||
mysqli_query($mysqli,"UPDATE custom_fields SET custom_field_label = '$label', custom_field_type = '$type' WHERE custom_field_id = $custom_field_id");
|
||||
|
||||
// Logging
|
||||
logAction("Custom Field", "Edit", "$session_name edited custom field $label", 0, $custom_field_id);
|
||||
|
||||
flash_alert("Custom field <strong>$label</strong> edited");
|
||||
@@ -43,19 +41,15 @@ if(isset($_POST['edit_custom_field'])){
|
||||
}
|
||||
|
||||
if(isset($_GET['delete_custom_field'])){
|
||||
|
||||
$custom_field_id = intval($_GET['delete_custom_field']);
|
||||
|
||||
// Get Custom Field Label for logging
|
||||
$sql = mysqli_query($mysqli,"SELECT custom_field_label FROM custom_fields WHERE custom_field_id = $custom_field_id");
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$custom_field_label = sanitizeInput($row['custom_field_label']);
|
||||
$label = sanitizeInput(getFieldById('custom_fields', $custom_field_id, 'custom_field_label'));
|
||||
|
||||
mysqli_query($mysqli,"DELETE FROM custom_fields WHERE custom_field_id = $custom_field_id");
|
||||
|
||||
// Logging
|
||||
logAction("Custom Field", "Delete", "$session_name deleted custom field $label");
|
||||
|
||||
$_SESSION['alert_type'] = "error";
|
||||
flash_alert("Custom field <strong>$label</strong> deleted", 'error');
|
||||
|
||||
redirect();
|
||||
|
||||
Reference in New Issue
Block a user