Merge pull request #17533 from daraelmin/daraelmin-mailing-subskey

New substitution key for member new form url in mailing
This commit is contained in:
Laurent Destailleur 2021-05-11 19:41:12 +02:00 committed by GitHub
commit 780254bfd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2019 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -244,6 +245,9 @@ if (empty($reshook)) {
$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'contractline'.$obj->source_id, 2);
}
}
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = '<a target="_blank" href="'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.((!empty($conf->multicompany->enabled)) ? '?entity='.$conf->entity : '').'">'.$langs->trans('BlankSubscriptionForm'). '</a>';
}
/* For backward compatibility, deprecated */
if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) {
$substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);

View File

@ -1633,6 +1633,9 @@ class FormMail extends Form
$vars['__SECUREKEYPAYMENT_CONTRACTLINE__']='';
*/
}
if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = 'BlankSubscriptionForm';
}
}
foreach ($tmparray as $key => $val) {