aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/ThreegcardsController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/ThreegcardsController.php')
-rw-r--r--h-source/Application/Controllers/ThreegcardsController.php41
1 files changed, 1 insertions, 40 deletions
diff --git a/h-source/Application/Controllers/ThreegcardsController.php b/h-source/Application/Controllers/ThreegcardsController.php
index 2ddc108..dbd1315 100644
--- a/h-source/Application/Controllers/ThreegcardsController.php
+++ b/h-source/Application/Controllers/ThreegcardsController.php
@@ -41,46 +41,7 @@ class ThreegcardsController extends GenericController
$this->m['HardwareModel']->id_user = $this->s['registered']->status['id_user'];
$this->m['HardwareModel']->type = '3G-card';
- //hardware conditions
- $this->m['HardwareModel']->strongConditions['update'] = array(
- "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
- "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
- "checkLength|99" => "model",
- "+checkLength|299" => "distribution",
- "++checkIsStrings|".ThreeGcards::$commYear => "comm_year",
- "+++checkIsStrings|".ThreeGcards::$select => "wifi_works",
- "++++checkIsStrings|".ThreeGcards::interfaceList() => "interface",
- );
-
- $this->m['HardwareModel']->strongConditions['insert'] = array(
- "checkNotEmpty" => "model|you have to fill the <i>model name</i> entry",
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the <i>model name</i> entry",
- "+checkMatch|/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/" => "pci_id|<i>VendorID:ProductID</i> has to have the following format: [a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}",
- "checkLength|99" => "model",
- "+checkLength|299" => "distribution",
- "++checkIsStrings|".ThreeGcards::$commYear => "comm_year",
- "+++checkIsStrings|".ThreeGcards::$select => "wifi_works",
- "++++checkIsStrings|".ThreeGcards::interfaceList() => "interface",
- );
-
- $this->m['HardwareModel']->softConditions['update'] = array(
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
- "checkLength|20000" => "description",
- "+checkLength|49" => "kernel",
- "++checkLength|49" => "driver",
- "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
- "+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
- );
-
- $this->m['HardwareModel']->softConditions['insert'] = array(
- "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the <i>kernel</i> entry",
- "checkLength|20000" => "description",
- "+checkLength|49" => "kernel",
- "++checkLength|49" => "driver",
- "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",
- "+++checkLength|1000" => "other_names|the <i>other names</i> entry exceeds the value of 1000 characters",
- );
+ $this->m['HardwareModel']->setConditions(Wifi::$wifiSelect,'wifi_works',ThreeGcards::interfaceList());
$this->m['HardwareModel']->setFields('model,kernel,description,distribution,comm_year,wifi_works,pci_id,interface,driver,other_names','sanitizeAll');