diff options
Diffstat (limited to 'h-source/Application/Models/HardwareModel.php')
-rw-r--r-- | h-source/Application/Models/HardwareModel.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php index 17565ff..7df7a65 100644 --- a/h-source/Application/Models/HardwareModel.php +++ b/h-source/Application/Models/HardwareModel.php @@ -119,6 +119,8 @@ class HardwareModel extends Model_Map { $revisions = new RevisionsModel(); $revisions->values = $oldValues; + $revisions->sanitize(); + if ($revisions->insert()) { parent::update($clean['id']); @@ -162,11 +164,14 @@ class HardwareModel extends Model_Map { if (count($newStruct > 0)) { $revisions->values = $oldStruct[0]['hardware']; - + $revisions->sanitize(); + $this->values = $newStruct[0]['revisions']; $this->values['updated_by'] = (int)$this->id_user; $this->values['update_date'] = date('Y-m-d H:i:s'); - + + $this->sanitize(); + if ($revisions->insert()) { if (parent::update($clean['id_hard'])) |