FIX Bad error and style message when changing its own login

This commit is contained in:
Laurent Destailleur 2016-03-18 11:30:15 +01:00
parent 7fa71214bc
commit 5edeeae384
3 changed files with 3 additions and 2 deletions

View File

@ -4559,7 +4559,7 @@ function setEventMessage($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);
else
{

View File

@ -195,3 +195,4 @@ WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when dis
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.
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.

View File

@ -470,7 +470,7 @@ if (empty($reshook)) {
{
$error++;
$langs->load("errors");
setEventMessages($langs->transnoentitiesnoconv("ErrorFailedToCreateDir", $dir), $mesgs, 'errors');
setEventMessages($langs->transnoentitiesnoconv("WarningYourLoginWasModifiedPleaseLogin"), null, 'warnings');
}
} else {
$db->rollback();