diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-06-05 11:09:40 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-06-05 11:09:40 +0000 |
commit | 9a5338f565e600e618cc4546abbf18d30d942b3a (patch) | |
tree | e5eca4149e71ce3a204de2070cf78a9f9e0bfd6a /h-source/Application/Models/HardwareModel.php | |
parent | 310356e1c7777c0e421af7c744a44827c4869a5e (diff) |
improved the way deleted devices are managed
Diffstat (limited to 'h-source/Application/Models/HardwareModel.php')
-rw-r--r-- | h-source/Application/Models/HardwareModel.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php index 9633eac..a3745cf 100644 --- a/h-source/Application/Models/HardwareModel.php +++ b/h-source/Application/Models/HardwareModel.php @@ -72,6 +72,11 @@ class HardwareModel extends Model_Map { parent::__construct(); } + public function pUpdate($id) + { + return parent::update($id); + } + public function insert() { $this->values['created_by'] = (int)$this->id_user; @@ -241,4 +246,15 @@ class HardwareModel extends Model_Map { } } + public function isDeleted($id) + { + $clean['id'] = (int)$id; + $res = $this->select('hardware.deleted')->where(array('id_hard'=>$clean['id']))->send(); + if ( count($res) > 0 ) + { + return strcmp($res[0]['hardware']['deleted'],'no') === 0 ? false : true; + } + return false; + } + }
\ No newline at end of file |