From ca7d7244f3da170e3730f980db0b483094ea57bd Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sun, 29 Dec 2013 06:55:39 +0000 Subject: [PATCH] Fix the insert for the new field. --- app/devices/device_edit.php | 2 ++ app/devices/device_key_edit.php | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 94e598c868..a4dcb1750f 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -258,6 +258,7 @@ require_once "resources/require.php"; $sql .= "device_uuid, "; $sql .= "device_key_uuid, "; $sql .= "device_key_id, "; + $sql .= "device_key_category, "; $sql .= "device_key_type, "; $sql .= "device_key_value, "; $sql .= "device_key_label "; @@ -268,6 +269,7 @@ require_once "resources/require.php"; $sql .= "'$device_uuid', "; $sql .= "'".uuid()."', "; $sql .= "'$device_key_id', "; + $sql .= "'$device_key_category', "; $sql .= "'$device_key_type', "; $sql .= "'$device_key_value', "; $sql .= "'$device_key_label' "; diff --git a/app/devices/device_key_edit.php b/app/devices/device_key_edit.php index 4c6e5694c3..e972303a6b 100644 --- a/app/devices/device_key_edit.php +++ b/app/devices/device_key_edit.php @@ -98,7 +98,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "device_key_uuid, "; $sql .= "device_uuid, "; $sql .= "device_key_id, "; - $sql .= "device_key_type, "; + $sql .= "device_key_category, "; $sql .= "device_key_type, "; $sql .= "device_key_value, "; $sql .= "device_key_label "; @@ -109,7 +109,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "'".uuid()."', "; $sql .= "'$device_uuid', "; $sql .= "'$device_key_id', "; - $sql .= "'$device_key_type', "; + $sql .= "'$device_key_category', "; $sql .= "'$device_key_type', "; $sql .= "'$device_key_value', "; $sql .= "'$device_key_label' "; @@ -129,7 +129,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update" && permission_exists('device_key_edit')) { $sql = "update v_device_keys set "; $sql .= "device_key_id = '$device_key_id', "; - $sql .= "device_key_type = '$device_key_type', "; + $sql .= "device_key_category = '$device_key_category', "; $sql .= "device_key_type = '$device_key_type', "; $sql .= "device_key_value = '$device_key_value', "; $sql .= "device_key_label = '$device_key_label' "; @@ -160,7 +160,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $device_key_id = $row["device_key_id"]; - $device_key_type = $row["device_key_type"]; + $device_key_category = $row["device_key_category"]; $device_key_type = $row["device_key_type"]; $device_key_value = $row["device_key_value"]; $device_key_label = $row["device_key_label"];