Update device_profile_edit.php
This commit is contained in:
@@ -130,14 +130,14 @@
|
|||||||
|
|
||||||
//save the profile
|
//save the profile
|
||||||
if ($save) {
|
if ($save) {
|
||||||
$orm = new orm;
|
$database = new database;
|
||||||
$orm->app_name = 'devices';
|
$database->app_name = 'devices';
|
||||||
$orm->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
$database->app_uuid = '4efa1a1a-32e7-bf83-534b-6c8299958a8e';
|
||||||
if (strlen($device_profile_uuid) > 0) {
|
if (strlen($device_profile_uuid) > 0) {
|
||||||
$orm->uuid($device_profile_uuid);
|
$database->uuid($device_profile_uuid);
|
||||||
}
|
}
|
||||||
$orm->save($array);
|
$database->save($array);
|
||||||
$response = $orm->message;
|
$response = $database->message;
|
||||||
if (strlen($response['uuid']) > 0) {
|
if (strlen($response['uuid']) > 0) {
|
||||||
$device_profile_uuid = $response['uuid'];
|
$device_profile_uuid = $response['uuid'];
|
||||||
}
|
}
|
||||||
@@ -171,11 +171,11 @@
|
|||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||||
$orm = new orm;
|
$sql = "select * from v_device_profiles ";
|
||||||
$orm->name('device_profiles');
|
$sql .= "where device_profile_uuid = '$device_profile_uuid' ";
|
||||||
$orm->uuid($device_profile_uuid);
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$result = $orm->find()->get();
|
$prep_statement->execute();
|
||||||
//$message = $orm->message;
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
foreach ($result as &$row) {
|
foreach ($result as &$row) {
|
||||||
$device_profile_name = $row["device_profile_name"];
|
$device_profile_name = $row["device_profile_name"];
|
||||||
$device_profile_domain_uuid = $row["domain_uuid"];
|
$device_profile_domain_uuid = $row["domain_uuid"];
|
||||||
|
|||||||
Reference in New Issue
Block a user