Fix sql error

This commit is contained in:
Laurent Destailleur 2023-02-26 12:45:13 +01:00
parent 32ba0acb32
commit d97725173b
2 changed files with 2 additions and 4 deletions

View File

@ -11546,7 +11546,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$error = '')
return '1 = 3'; // Bad syntax of the search string, we force a SQL not found return '1 = 3'; // Bad syntax of the search string, we force a SQL not found
} }
return " AND (".preg_replace_callback('/'.$regexstring.'/', 'dolForgeCriteriaCallback', $filter).")"; return " AND (".preg_replace_callback('/'.$regexstring.'/i', 'dolForgeCriteriaCallback', $filter).")";
} }
/** /**

View File

@ -564,9 +564,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle'); print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle');
} }
if ($object->status == $object::STATUS_DRAFT) { print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
}
// Back to draft // Back to draft
if ($object->status != $object::STATUS_DRAFT) { if ($object->status != $object::STATUS_DRAFT) {