forked from Wavyzz/dolibarr
Fix: Bad error message
This commit is contained in:
@@ -1295,18 +1295,10 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
setEventMessage($mesg, 'errors');
|
setEventMessage($mesg, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
$mesg='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').' !</div>';
|
|
||||||
$action='presend';
|
|
||||||
dol_syslog('Recipient email is empty');
|
|
||||||
}*/
|
|
||||||
} else {
|
} else {
|
||||||
$langs->load("errors");
|
$langs->load("other");
|
||||||
setEventMessage($langs->trans('ErrorCantReadFile', $file), 'errors');
|
setEventMessage($langs->trans('ErrorMailRecipientIsEmpty') . '!', 'errors');
|
||||||
dol_syslog('Failed to read file: ' . $file);
|
dol_syslog($langs->trans('ErrorMailRecipientIsEmpty'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|||||||
@@ -1615,8 +1615,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
$sendtoid = $_POST['receiver'];
|
$sendtoid = $_POST['receiver'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dol_strlen($sendto)) {
|
if (dol_strlen($sendto))
|
||||||
|
{
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] . '>';
|
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] . '>';
|
||||||
@@ -1715,17 +1716,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
setEventMessage($mesg, 'errors');
|
setEventMessage($mesg, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$langs->load("other");
|
|
||||||
$mesgs[]='<div class="error">'.$langs->trans('ErrorMailRecipientIsEmpty').'</div>';
|
|
||||||
dol_syslog('Recipient email is empty');
|
|
||||||
}*/
|
|
||||||
} else {
|
} else {
|
||||||
$langs->load("errors");
|
$langs->load("other");
|
||||||
setEventMessage($langs->trans('ErrorCantReadFile', $file), 'errors');
|
setEventMessage($langs->trans('ErrorMailRecipientIsEmpty') . '!', 'errors');
|
||||||
dol_syslog('Failed to read file: ' . $file);
|
dol_syslog($langs->trans('ErrorMailRecipientIsEmpty'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|||||||
@@ -2862,7 +2862,11 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
|
|||||||
|
|
||||||
$listofcurrenciesbefore=array('USD');
|
$listofcurrenciesbefore=array('USD');
|
||||||
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
||||||
else $cursymbolafter.=$outlangs->getCurrencySymbol($currency_code);
|
else
|
||||||
|
{
|
||||||
|
$tmpcur=$outlangs->getCurrencySymbol($currency_code);
|
||||||
|
$cursymbolafter.=($tmpcur == $currency_code ? ' '.$tmpcur : $tmpcur);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$output=$cursymbolbefore.$output.$end.$cursymbolafter;
|
$output=$cursymbolbefore.$output.$end.$cursymbolafter;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user