mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Added default value for group weight
This commit is contained in:
parent
0802ce8993
commit
a5243fa1f3
@ -100,9 +100,12 @@ if (isset($_POST['name'])) {
|
|||||||
if ($email != '' && !is_valid_email($email))
|
if ($email != '' && !is_valid_email($email))
|
||||||
$errors[] = wrong_field("form.field.mail");
|
$errors[] = wrong_field("form.field.mail");
|
||||||
|
|
||||||
if (! preg_match("/^\d{1,9}$/", $weight))
|
if (! preg_match("/^(\d{1,9})?$/", $weight))
|
||||||
$errors[] = wrong_field("form.field.groupweight");
|
$errors[] = wrong_field("form.field.groupweight");
|
||||||
|
|
||||||
|
if ($weight == '')
|
||||||
|
$weight = 0;
|
||||||
|
|
||||||
if (! $parentgroup)
|
if (! $parentgroup)
|
||||||
$parentgroup = NULL;
|
$parentgroup = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user