From 2f0587286b4e433b96a7db5db60a0dd94617f485 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 3 Oct 2011 08:18:08 +0000 Subject: added the field can free systems be installed to notebooks category - Michał Masłowski suggestion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Application/Controllers/DownloadController.php | 1 + .../Controllers/NotebooksController.php | 29 +++------------------- 2 files changed, 5 insertions(+), 25 deletions(-) (limited to 'h-source/Application/Controllers') diff --git a/h-source/Application/Controllers/DownloadController.php b/h-source/Application/Controllers/DownloadController.php index d58ba6c..1e4f94e 100644 --- a/h-source/Application/Controllers/DownloadController.php +++ b/h-source/Application/Controllers/DownloadController.php @@ -71,6 +71,7 @@ class DownloadController extends BaseController { $xml .= "\t\t".translate($row['hardware']['architecture'])."\n"; $xml .= "\t\t".$row['hardware']['bios']."\n"; + $xml .= "\t\t".$row['hardware']['can_free_systems_be_installed']."\n"; } $xml .= "\t\t".$row['hardware']['model']."\n"; diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index 103ac05..febf5f9 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -56,23 +56,10 @@ class NotebooksController extends GenericController "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", "++++++++checkIsStrings|".Notebooks::architectureList() => "architecture", + "+++++++++checkIsStrings|".Notebooks::$installableSelect => "can_free_systems_be_installed", ); - $this->m['HardwareModel']->strongConditions['insert'] = array( - "checkIsStrings|".Notebooks::vendorsList() => "vendor", - "checkNotEmpty" => "model|you have to fill the model name entry", - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\(\)\[\]\/]+$/" => "model|characters not allowed in the model name entry", - "+checkIsStrings|".Notebooks::compatibilityList() => "compatibility", - "checkLength|99" => "model", - "+checkLength|299" => "distribution", - "++checkIsStrings|".Notebooks::$commYear => "comm_year", - "+++checkIsStrings|".Notebooks::$subtypeSelect => "subtype", - "++++checkIsStrings|".Notebooks::wifiList() => "wifi_works", - "+++++checkIsStrings|".Notebooks::videoList() => "video_card_works", - "++++++checkIsStrings|".Notebooks::$biosSelect => "bios", - "+++++++checkIsStrings|".Notebooks::webcamList() => "webcam_works", - "++++++++checkIsStrings|".Notebooks::architectureList() => "architecture", - ); + $this->m['HardwareModel']->strongConditions['insert'] = $this->m['HardwareModel']->strongConditions['update']; $this->m['HardwareModel']->softConditions['update'] = array( "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", @@ -84,17 +71,9 @@ class NotebooksController extends GenericController "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the webcam entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", ); - $this->m['HardwareModel']->softConditions['insert'] = array( - "checkMatch|/^[a-zA-Z0-9\-\_\.\+\s]+$/" => "kernel|characters not allowed in the kernel entry", - "checkLength|20000" => "description", - "++checkLength|99" => "video_card_type,wifi_type", - "+++checkLength|49" => "kernel", - "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the videocard entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", - "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the wifi entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", - "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the webcam entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", - ); + $this->m['HardwareModel']->softConditions['insert'] = $this->m['HardwareModel']->softConditions['update']; - $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype,bios,webcam_type,webcam_works,architecture','sanitizeAll'); + $this->m['HardwareModel']->setFields('vendor,model,compatibility,kernel,description,distribution,video_card_type,video_card_works,wifi_type,wifi_works,comm_year,subtype,bios,can_free_systems_be_installed,webcam_type,webcam_works,architecture','sanitizeAll'); $argKeys = array( 'page:forceNat' => 1, -- cgit v1.2.3