aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models/HardwareModel.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-06-23 19:45:28 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-06-23 19:45:28 +0000
commite29f02659a5328a52042fb43bd3baad321ee3e91 (patch)
treeb8f6fc9ba122bc5094974e932458f069285fc6b0 /h-source/Application/Models/HardwareModel.php
parent34adb20d0ffe996bf454ade33ff02fef70968730 (diff)
administrators can now approve device page submitted by anonymous users
Diffstat (limited to 'h-source/Application/Models/HardwareModel.php')
-rw-r--r--h-source/Application/Models/HardwareModel.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
index 3badd71..11aea59 100644
--- a/h-source/Application/Models/HardwareModel.php
+++ b/h-source/Application/Models/HardwareModel.php
@@ -74,6 +74,13 @@ class HardwareModel extends Model_Map {
public function pUpdate($id)
{
+ if (isset($this->values['approved']))
+ {
+ if (strcmp($this->values['approved'],'yes') === 0)
+ {
+ $this->values['deleted'] = 'no';
+ }
+ }
return parent::update($id);
}