2
0
forked from Wavyzz/dolibarr

Fix: Removed a hard coded error code.

This commit is contained in:
Laurent Destailleur
2012-11-20 11:23:34 +01:00
parent 8d50def412
commit e53f6a383d
3 changed files with 6 additions and 5 deletions

View File

@@ -2190,17 +2190,18 @@ function dol_print_error($db='',$error='')
} }
/** /**
* Show email to contact if technical error * Show a public email and error code to contact if technical error
* *
* @param string $prefixcode Prefix of public error code
* @return void * @return void
*/ */
function dol_print_error_email() function dol_print_error_email($prefixcode)
{ {
global $langs,$conf; global $langs,$conf;
$langs->load("errors"); $langs->load("errors");
$now=dol_now(); $now=dol_now();
print '<br><div class="error">'.$langs->trans("ErrorContactEMail",$conf->global->MAIN_INFO_SOCIETE_MAIL,'ERRORNEWPAYMENT'.dol_print_date($now,'%Y%m%d')).'</div>'; print '<br><div class="error">'.$langs->trans("ErrorContactEMail", $conf->global->MAIN_INFO_SOCIETE_MAIL, $prefixcode.dol_print_date($now,'%Y%m%d')).'</div>';
} }
/** /**

View File

@@ -761,7 +761,7 @@ if ($found && ! $error) // We are in a management option and no error
} }
else else
{ {
dol_print_error_email(); dol_print_error_email('ERRORNEWPAYMENTPAYBOX');
} }
print '</td></tr>'."\n"; print '</td></tr>'."\n";

View File

@@ -944,7 +944,7 @@ if ($found && ! $error) // We are in a management option and no error
} }
else else
{ {
dol_print_error_email(); dol_print_error_email('ERRORNEWPAYMENTPAYPAL');
} }
print '</td></tr>'."\n"; print '</td></tr>'."\n";