diff options
Diffstat (limited to 'html/maintenance.php')
-rw-r--r-- | html/maintenance.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/html/maintenance.php b/html/maintenance.php index 8e32090..8c64713 100644 --- a/html/maintenance.php +++ b/html/maintenance.php @@ -44,8 +44,6 @@ if (array_key_exists('machine',$_GET)) { $machine_id = $db -> lastInsertRowID(); $stm -> close(); - $key_id = $db -> add_key(); - $stm = $db -> prepare( 'INSERT INTO "values" (machine_id, state_id) VALUES (:machine, :state)' ); @@ -61,12 +59,7 @@ if (array_key_exists('machine',$_GET)) { } $stm -> close(); - $stm = $db -> prepare( - 'INSERT INTO permissions (key_id, value_id) VALUES (:key,:value)'); - $stm -> bindValue('value', $running_id); - $stm -> bindValue('key', $key_id); - $stm -> execute(); - $stm -> close(); + $db -> add_key_for($machine_id, $running_id); } $stm = $db -> prepare( |