aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models/HardwareModel.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-06-05 11:09:40 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-06-05 11:09:40 +0000
commit9a5338f565e600e618cc4546abbf18d30d942b3a (patch)
treee5eca4149e71ce3a204de2070cf78a9f9e0bfd6a /h-source/Application/Models/HardwareModel.php
parent310356e1c7777c0e421af7c744a44827c4869a5e (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.php16
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