From 7accfb486c2035ba010e1c55e2ab875d8f906bf8 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Fri, 15 Jul 2011 15:43:30 +0000 Subject: permanently deleted devices are no more shown in the history --- h-source/Application/Models/HardwareModel.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'h-source/Application/Models/HardwareModel.php') diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php index 1c552c0..7d5060c 100644 --- a/h-source/Application/Models/HardwareModel.php +++ b/h-source/Application/Models/HardwareModel.php @@ -74,11 +74,16 @@ class HardwareModel extends Model_Map { public function permanentlyDelete($id) { + $clean['id'] = (int)$id; + + $record = $this->selectId($clean['id']); + $this->values['deleted'] = 'no'; $this->values['approved'] = 'yes'; $this->values['pci_id'] = ''; + $this->values['model'] = '[permanently deleted] '.$record['model']; - return parent::update($id); + return parent::update($clean['id']); } public function pUpdate($id) -- cgit v1.2.3