diff options
Diffstat (limited to 'modules-available/statistics/pages/replace.inc.php')
-rw-r--r-- | modules-available/statistics/pages/replace.inc.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules-available/statistics/pages/replace.inc.php b/modules-available/statistics/pages/replace.inc.php index ae9c6108..9c16aed7 100644 --- a/modules-available/statistics/pages/replace.inc.php +++ b/modules-available/statistics/pages/replace.inc.php @@ -69,14 +69,17 @@ class SubPage // Finalize by updating machine table foreach ($list as $entry) { unset($entry['datelimit']); - Database::exec('UPDATE machine old, machine new SET + Database::exec("UPDATE machine old, machine new SET new.fixedlocationid = old.fixedlocationid, new.position = old.position, old.position = NULL, + old.subnetlocationid = NULL, + old.fixedlocationid = NULL, new.notes = old.notes, old.notes = NULL, - old.lastseen = new.firstseen - WHERE old.machineuuid = :old AND new.machineuuid = :new', $entry); + old.lastseen = new.firstseen, + old.clientip = '0.0.0.0' + WHERE old.machineuuid = :old AND new.machineuuid = :new", $entry); } Message::addSuccess('x-machines-replaced', count($list)); } |