aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Models')
-rw-r--r--h-source/Application/Models/HardwareModel.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
index a1aa01b..1c552c0 100644
--- a/h-source/Application/Models/HardwareModel.php
+++ b/h-source/Application/Models/HardwareModel.php
@@ -72,9 +72,13 @@ class HardwareModel extends Model_Map {
parent::__construct();
}
- public function oupdate($id)
+ public function permanentlyDelete($id)
{
- return $this->pUpdate($id);
+ $this->values['deleted'] = 'no';
+ $this->values['approved'] = 'yes';
+ $this->values['pci_id'] = '';
+
+ return parent::update($id);
}
public function pUpdate($id)
@@ -284,5 +288,16 @@ class HardwareModel extends Model_Map {
}
return false;
}
+
+ public function isCleared($id)
+ {
+ $clean['id'] = (int)$id;
+ $res = $this->select('hardware.cleared')->where(array('id_hard'=>$clean['id']))->send();
+ if ( count($res) > 0 )
+ {
+ return strcmp($res[0]['hardware']['cleared'],'no') === 0 ? false : true;
+ }
+ return false;
+ }
} \ No newline at end of file