From 7730d1ca583937af304dc89ad3748d3a11eb85e4 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Mon, 18 Apr 2011 14:32:13 +0000 Subject: [PATCH] now fix it git-svn-id: http://www.observium.org/svn/observer/trunk@2097 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/edit/device.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/html/pages/device/edit/device.inc.php b/html/pages/device/edit/device.inc.php index 5084be2f73..9678968061 100644 --- a/html/pages/device/edit/device.inc.php +++ b/html/pages/device/edit/device.inc.php @@ -12,7 +12,7 @@ if ($_POST['editing']) $disabled = mres($_POST['disabled']); $override_sysLocation_bool = mres($_POST['override_sysLocation']); - if (isset($_POST['sysLocation'])) { $override_sysLocation_string = mres($_POST['sysLocation']); } + if (isset($_POST['sysLocation'])) { $override_sysLocation_string = mres($_POST['sysLocation']); } if (get_dev_attrib($device,'override_sysLocation_bool') != $override_sysLocation_bool || get_dev_attrib($device,'override_sysLocation_string') != $override_sysLocation_string) @@ -31,10 +31,13 @@ if ($_POST['editing']) $rows_updated = mysql_affected_rows(); - if ($rows_updated != 0) + if ($rows_updated > 0 || $updated) { $update_message = "Device record updated."; $updated = 1; + } elseif ($rows_updated = '-1') { + $update_message = "Device record unchanged. No update necessary."; + $updated = -1; } else { $update_message = "Device record update error."; }