aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-15 15:43:30 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-15 15:43:30 +0000
commit7accfb486c2035ba010e1c55e2ab875d8f906bf8 (patch)
tree2582739b8b05559000c1659f21b98805a78acb51 /h-source/Application/Models
parentff7042aba4ba6a98b98b7a4435417d63374f2d69 (diff)
permanently deleted devices are no more shown in the history
Diffstat (limited to 'h-source/Application/Models')
-rw-r--r--h-source/Application/Models/HardwareModel.php7
-rw-r--r--h-source/Application/Models/HistoryModel.php1
2 files changed, 7 insertions, 1 deletions
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)
diff --git a/h-source/Application/Models/HistoryModel.php b/h-source/Application/Models/HistoryModel.php
index 4e345ed..cf63dbe 100644
--- a/h-source/Application/Models/HistoryModel.php
+++ b/h-source/Application/Models/HistoryModel.php
@@ -29,6 +29,7 @@ class HistoryModel extends Model_Tree {
$this->_where=array(
'approved' => 'hardware',
'deleted' => 'hardware',
+ 'cleared' => 'hardware',
);
$this->orderBy = 'history.id_history';