This commit is contained in:
Frédéric FRANCE 2021-01-13 16:23:54 +01:00
parent cb7266d261
commit 40a45efb63
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 15 additions and 5 deletions

View File

@ -3699,14 +3699,18 @@ abstract class CommonObject
*/
static public function deleteAllItemsLinkedByObjectID($fk_object_where, $field_where, $table_element)
{
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) return -1;
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) {
return -1;
}
global $db;
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table_element.' WHERE '.$field_where.' = '.$fk_object_where;
$resql = $db->query($sql);
if (empty($resql)) return 0;
if (empty($resql)) {
return 0;
}
return 1;
}

View File

@ -1509,9 +1509,15 @@ class FormMail extends Form
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet in mass emailing
$onlinepaymentenabled = 0;
if (!empty($conf->paypal->enabled)) $onlinepaymentenabled++;
if (!empty($conf->paybox->enabled)) $onlinepaymentenabled++;
if (!empty($conf->stripe->enabled)) $onlinepaymentenabled++;
if (!empty($conf->paypal->enabled)) {
$onlinepaymentenabled++;
}
if (!empty($conf->paybox->enabled)) {
$onlinepaymentenabled++;
}
if (!empty($conf->stripe->enabled)) {
$onlinepaymentenabled++;
}
if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
$tmparray['__SECUREKEYPAYMENT__'] = $conf->global->PAYMENT_SECURITY_TOKEN;
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {