Merge pull request #3664 from FHenry/3.7

FIX : New adherent from, always redirect on entity
This commit is contained in:
Laurent Destailleur 2015-10-09 20:15:23 +02:00
commit 53c9cb38ef

View File

@ -304,7 +304,6 @@ if ($action == 'add')
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref; $urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref;
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount')); if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email')); if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
if (! empty($entity)) $urlback.='&entity='.$entity;
} }
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
{ {
@ -315,7 +314,7 @@ if ($action == 'add')
{ {
$urlback.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2); $urlback.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2);
} }
if (! empty($entity)) $urlback.='&entity='.$entity;
} }
else else
{ {
@ -324,6 +323,7 @@ if ($action == 'add')
} }
} }
if (! empty($entity)) $urlback.='&entity='.$entity;
dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback); dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback);
Header("Location: ".$urlback); Header("Location: ".$urlback);
exit; exit;