FIX Bad error and style message when changing its own login
This commit is contained in:
parent
7fa71214bc
commit
5edeeae384
@ -4559,7 +4559,7 @@ function setEventMessage($mesgs, $style='mesgs')
|
|||||||
*/
|
*/
|
||||||
function setEventMessages($mesg, $mesgs, $style='mesgs')
|
function setEventMessages($mesg, $mesgs, $style='mesgs')
|
||||||
{
|
{
|
||||||
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage');
|
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter style='.$style.' for setEventMessages');
|
||||||
if (empty($mesgs)) setEventMessage($mesg, $style);
|
if (empty($mesgs)) setEventMessage($mesg, $style);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -195,3 +195,4 @@ WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when dis
|
|||||||
WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s.
|
WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s.
|
||||||
WarningTooManyDataPleaseUseMoreFilters=Too many data (more than %s lines). Please use more filters or set the constant %s to a higher limit.
|
WarningTooManyDataPleaseUseMoreFilters=Too many data (more than %s lines). Please use more filters or set the constant %s to a higher limit.
|
||||||
WarningSomeLinesWithNullHourlyRate=Some times were recorded by users when their hourly rate was not defined. A value of 0 was used but this may result in wrong valuation of time spent.
|
WarningSomeLinesWithNullHourlyRate=Some times were recorded by users when their hourly rate was not defined. A value of 0 was used but this may result in wrong valuation of time spent.
|
||||||
|
WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security purpose you will have to login with your new login before next action.
|
||||||
|
|||||||
@ -470,7 +470,7 @@ if (empty($reshook)) {
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessages($langs->transnoentitiesnoconv("ErrorFailedToCreateDir", $dir), $mesgs, 'errors');
|
setEventMessages($langs->transnoentitiesnoconv("WarningYourLoginWasModifiedPleaseLogin"), null, 'warnings');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user