From e1fd83ee78c5e3e28708a927e942a0ca719f35c1 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 19 Jul 2020 21:12:20 -0600 Subject: [PATCH] Improve --- api/actions/machine.php | 4 ++-- api/apisettings.php | 4 ++-- lib/Machine.lib.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/actions/machine.php b/api/actions/machine.php index ca48be8..687acad 100644 --- a/api/actions/machine.php +++ b/api/actions/machine.php @@ -36,8 +36,8 @@ if ($VARS["action"] != "lookup") { if (!empty($VARS["model"])) { $machine->setModel($VARS['model']); } - if (!empty($VARS["client"])) { - $machine->setClientID($VARS['client']); + if (!empty($VARS["clientid"])) { + $machine->setClientID($VARS['clientid']); } if (!empty($VARS["os"])) { $machine->setOS($VARS['os']); diff --git a/api/apisettings.php b/api/apisettings.php index 56d3cf1..ce63d84 100644 --- a/api/apisettings.php +++ b/api/apisettings.php @@ -24,7 +24,7 @@ $APIS = [ "id" => "/^[0-9a-z]+$/", "type (optional)" => "numeric", "model (optional)" => "string", - "client (optional)" => "string", + "clientid (optional)" => "string", "os (optional)" => "string", "serial (optional)" => "string", "manufacturer (optional)" => "string", @@ -39,7 +39,7 @@ $APIS = [ "vars" => [ "type (optional)" => "numeric", "model (optional)" => "string", - "client (optional)" => "string", + "clientid (optional)" => "string", "os (optional)" => "string", "serial (optional)" => "string", "manufacturer (optional)" => "string", diff --git a/lib/Machine.lib.php b/lib/Machine.lib.php index ca88349..4d42bd9 100644 --- a/lib/Machine.lib.php +++ b/lib/Machine.lib.php @@ -68,7 +68,7 @@ class Machine implements JsonSerializable { "components" => $this->components, "formdata" => [ "options" => [ - "clientid" => Clients::getAllAsIDNameArray(), + "clientid" => array_merge(["" => ""], Clients::getAllAsIDNameArray()), "type" => Machine::getTypeList() ], "inputtypes" => [