diff options
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 |