From 54b5a43006174ccfec34c9cdc57f5622d906b227 Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Tue, 27 Apr 2021 17:06:25 +0200 Subject: [PATCH] wip --- htdocs/langs/en_US/eventorganization.lang | 1 + htdocs/public/project/index.php | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 9ad2d45ddf4..7b5ddd8160c 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -108,6 +108,7 @@ EvntOrgWelcomeMessage = This form allows you to register as a new participant to EvntOrgDuration = This conference starts on %s and ends on %s. ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s. BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s +EventType = Event type # # SubscriptionOk page # diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index ce3f06a4cc3..4f376a2f10f 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -295,7 +295,6 @@ if (empty($reshook) && $action == 'add') { } } // From there we have a thirdparty, now looking for the contact - if (!$error) { $contact = new Contact($db); $resultcontact = $contact->fetch('', '', '', $email); @@ -447,9 +446,8 @@ if (empty($reshook) && $action == 'add') { } } else { // If no price has been set for the booth or this is a conference, we confirm it as suggested and we update - $conforbooth->setStatut(CONFERENCEORBOOTH::STATUS_SUGGESTED); + $conforbooth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED; $conforbooth->update($user); - // Sending mail require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; @@ -492,18 +490,17 @@ if (empty($reshook) && $action == 'add') { } else { dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); } - - $encodedid = dol_encode($id, $dolibarr_main_instance_unique_id); - $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); - $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$encodedid.'&securekey='.$securekeyurl; - Header("Location: ".$redirection); - exit; } } } } if (!$error) { $db->commit(); + $encodedid = dol_encode($id, $dolibarr_main_instance_unique_id); + $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$encodedid.'&securekey='.$securekeyurl; + Header("Location: ".$redirection); + exit; } else { $db->rollback(); }