diff options
-rw-r--r-- | h-source/Application/Controllers/NotebooksController.php | 2 | ||||
-rw-r--r-- | h-source/Application/Controllers/PrintersController.php | 2 | ||||
-rw-r--r-- | h-source/Application/Models/HardwareModel.php | 2 | ||||
-rw-r--r-- | h-source/MySQL_changelog/413_to_419_update_sql.sql | 4 | ||||
-rw-r--r-- | h-source/tables.sql | 6 |
5 files changed, 11 insertions, 5 deletions
diff --git a/h-source/Application/Controllers/NotebooksController.php b/h-source/Application/Controllers/NotebooksController.php index 4128a00..02ffbea 100644 --- a/h-source/Application/Controllers/NotebooksController.php +++ b/h-source/Application/Controllers/NotebooksController.php @@ -64,7 +64,7 @@ class NotebooksController extends GenericController "checkMatch|".Hardware::$regExpressions['kernel'] => "kernel|characters not allowed in the <i>kernel</i> entry", "checkLength|40000" => "description", "++checkLength|99" => "video_card_type,wifi_type", - "+++checkLength|49" => "kernel", + "+++checkLength|99" => "kernel", "+checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "video_card_type|only the following characters are allowed for the <i>videocard</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", "++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "wifi_type|only the following characters are allowed for the <i>wifi</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", "+++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/" => "webcam_type|only the following characters are allowed for the <i>webcam</i> entry: a-z A-Z 0-9 - _ . + / , : ; ( ) [ ]", diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php index 438bbba..fb78761 100644 --- a/h-source/Application/Controllers/PrintersController.php +++ b/h-source/Application/Controllers/PrintersController.php @@ -59,7 +59,7 @@ class PrintersController extends GenericController "checkMatch|".Hardware::$regExpressions['kernel'] => "kernel|characters not allowed in the <i>kernel</i> entry", "checkLength|40000" => "description", "+checkLength|49" => "driver", - "++checkLength|49" => "kernel", + "++checkLength|99" => "kernel", "++checkMatch|".Hardware::$regExpressions['driver'] => "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", ); diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php index 65bf868..9c8a5db 100644 --- a/h-source/Application/Models/HardwareModel.php +++ b/h-source/Application/Models/HardwareModel.php @@ -91,7 +91,7 @@ class HardwareModel extends Model_Map { $this->softConditions['update'] = array( "checkMatch|".Hardware::$regExpressions['kernel'] => "kernel|characters not allowed in the <i>kernel</i> entry", "checkLength|40000" => "description", - "+checkLength|49" => "kernel", + "+checkLength|99" => "kernel", "++checkLength|49" => "driver", "++checkMatch|".Hardware::$regExpressions['driver'] => "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", diff --git a/h-source/MySQL_changelog/413_to_419_update_sql.sql b/h-source/MySQL_changelog/413_to_419_update_sql.sql new file mode 100644 index 0000000..a17fc01 --- /dev/null +++ b/h-source/MySQL_changelog/413_to_419_update_sql.sql @@ -0,0 +1,4 @@ +-- Apply these queries in order to update your database from revision 413 to revision 419 + +alter table hardware modify kernel varchar(100) NOT NULL; +alter table revisions modify kernel varchar(100) NOT NULL; diff --git a/h-source/tables.sql b/h-source/tables.sql index f9ef911..08e2b10 100644 --- a/h-source/tables.sql +++ b/h-source/tables.sql @@ -134,7 +134,7 @@ CREATE TABLE IF NOT EXISTS `deletion` ( CREATE TABLE IF NOT EXISTS `hardware` ( `id_hard` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(50) NOT NULL, - `kernel` varchar(50) NOT NULL, + `kernel` varchar(100) NOT NULL, `vendor` varchar(50) NOT NULL, `model` varchar(200) NOT NULL, `created_by` int(11) NOT NULL, @@ -385,7 +385,7 @@ CREATE TABLE IF NOT EXISTS `regusers_groups` ( CREATE TABLE IF NOT EXISTS `revisions` ( `id_rev` int(10) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(50) NOT NULL, - `kernel` varchar(50) NOT NULL, + `kernel` varchar(100) NOT NULL, `vendor` varchar(50) NOT NULL, `model` varchar(200) NOT NULL, `created_by` int(11) NOT NULL, @@ -589,6 +589,8 @@ insert into distros (clean_name, full_name, id_order) values ('venenux_0_8_2', ' insert into distros (clean_name, full_name, id_order) values ('venenux_0_9', 'VENENUX 0.9', 25); insert into reggroups (name) values ('manager'); +insert into reggroups (name) values ('admin'); +insert into reggroups (name) values ('moderator'); insert into regusers (username,password) values ('admin',sha1('admin')); |