Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
Conflicts: htdocs/adherents/type.php htdocs/asset/type.php htdocs/categories/edit.php htdocs/comm/action/card.php htdocs/compta/bank/card.php htdocs/contact/card.php htdocs/contact/list.php htdocs/core/class/extrafields.class.php htdocs/don/card.php htdocs/product/stock/card.php htdocs/projet/card.php htdocs/projet/tasks/task.php htdocs/user/group/card.php
This commit is contained in:
commit
c3bfd5caa4
@ -312,7 +312,7 @@ if (empty($reshook)) {
|
||||
$object->public = GETPOST("public", 'alpha');
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ if ($action == 'update' && $user->rights->asset->write) {
|
||||
$object->note = trim($comment);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ if ($action == 'update' && $user->rights->categorie->creer) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
|
||||
}
|
||||
if (!$error && empty($object->error)) {
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -585,7 +585,7 @@ if (empty($reshook) && $action == 'update') {
|
||||
}
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
|
||||
if (!$error) {
|
||||
$id = $object->create($user);
|
||||
|
||||
@ -420,7 +420,7 @@ if (empty($reshook)) {
|
||||
$object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -101,9 +101,12 @@ $search_roles = GETPOST("search_roles", 'array');
|
||||
$search_level = GETPOST("search_level", "array");
|
||||
$search_stcomm = GETPOST('search_stcomm', 'int');
|
||||
|
||||
if ($search_status == '') {
|
||||
if ($search_status === '') {
|
||||
$search_status = 1; // always display active customer first
|
||||
}
|
||||
if ($search_no_email === '') {
|
||||
$search_no_email = -1;
|
||||
}
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
|
||||
@ -2069,7 +2069,8 @@ class ExtraFields
|
||||
if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key)) {
|
||||
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && $this->attributes[$object->table_element]['type'][$key] != 'boolean') {
|
||||
//when unticking boolean field, it's not set in POST
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ if ($action == 'update') {
|
||||
$object->modepaymentid = (int) GETPOST('modepayment', 'int');
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ if (empty($reshook)) {
|
||||
$object->fax = GETPOST("fax");
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ if (empty($reshook)) {
|
||||
$object->usage_organize_event = (GETPOST('usage_organize_event', 'alpha') == 'on' ? 1 : 0);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) {
|
||||
$object->progress = price2num(GETPOST('progress', 'alphanohtml'));
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ if (empty($reshook)) {
|
||||
$object->country_id = $country_id;
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -462,7 +462,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ if (empty($reshook)) {
|
||||
$object->note = dol_htmlcleanlastbr(trim(GETPOST("note", 'restricthtml')));
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user