From 2f3f2509b29b3c85f5d91d7f390bcff4b3994787 Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Wed, 14 Apr 2021 15:54:21 +0200 Subject: [PATCH] wip on asking for the company name only if price is set v2 --- .../eventorganization/attendee_subscription.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php index a18912da4ef..e40ad552b5c 100644 --- a/htdocs/public/eventorganization/attendee_subscription.php +++ b/htdocs/public/eventorganization/attendee_subscription.php @@ -81,8 +81,18 @@ $email = GETPOST("email"); $encodedid = GETPOST('id'); $id = dol_decode($encodedid, $dolibarr_main_instance_unique_id); -$project = new Project($db); +$conference = new ConferenceOrBooth($db); +$resultconf = $conference->fetch($id); +if ($resultconf < 0) { + setEventMessages(null, $object->errors, "errors"); +} +$project = new Project($db); +$resultproject = $project->fetch($conference->fk_project); +if ($resultproject < 0){ + $error++; + $errmsg .= $project->error; +} // Getting 'securekey'.'id' from Post and decoding it $encodedsecurekeyandid = GETPOST('securekey', 'alpha');