| '.$module->name." | \n";
print $module->info();
diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php
index 6110687f587..a27447682bb 100644
--- a/htdocs/eventorganization/conferenceorbooth_card.php
+++ b/htdocs/eventorganization/conferenceorbooth_card.php
@@ -497,6 +497,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
//$link_subscription .= base64_encode($id);
$key = 'DV3PH';
$link_subscription .= openssl_encrypt($id, 'aes-256-ctr', $key);
+ $link_subscription .= '&securekey='.$conf->global->EVENTORGANIZATION_SECUREKEY;
$object->fields['pubregister'] = array('type'=>'url', 'label'=>'Lien public d\'enregistrement à une conférence', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
$object->pubregister = $link_subscription;
$keyforbreak='pubregister';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 202f11f7f46..567519fdf04 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1750,6 +1750,7 @@ CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create th
##### Agenda #####
AgendaSetup=Events and agenda module setup
PasswordTogetVCalExport=Key to authorize export link
+SecurityKey = Security Key
PastDelayVCalExport=Do not export event older than
AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events)
AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form
diff --git a/htdocs/public/members/attendee_subscription.php b/htdocs/public/members/attendee_subscription.php
index 33034be7019..95eee72785a 100644
--- a/htdocs/public/members/attendee_subscription.php
+++ b/htdocs/public/members/attendee_subscription.php
@@ -77,7 +77,12 @@ $action = GETPOST('action', 'aZ09');
//$id = base64_decode(GETPOST("id"));
$key = 'DV3PH';
$id = openssl_decrypt(GETPOST('id'), 'aes-256-ctr', $key);
-var_dump($id);
+
+// Securekey check
+$securekey = GETPOST('securekey', 'alpha');
+if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY) {
+ exit;
+}
// Load translation files
$langs->loadLangs(array("main", "companies", "install", "other", "eventorganization"));
@@ -205,8 +210,9 @@ if (empty($reshook) && $action == 'add') {
$thirdparty->fournisseur = 0;
$thirdparty->country_id = GETPOST("country_id", 'int');
$thirdparty->state_id = GETPOST("state_id", 'int');
+ //$thirdparty->code_client = -1;
+ //$thirdparty->code_fournisseur = -1;
- //@todo jusqu'à la ligne 223 : pas sûr
// Load object modCodeTiers
$module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard');
if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') {
@@ -220,9 +226,20 @@ if (empty($reshook) && $action == 'add') {
}
}
$modCodeClient = new $module($db);
- $tmpcode = $object->code_client;
- if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
- $tmpcode = $modCodeClient->getNextValue($object, 0);
+ // We verified if the tag prefix is used
+ if ($modCodeClient->code_auto) {
+ $prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed();
+ }
+ $module = $conf->global->SOCIETE_CODECLIENT_ADDON;
+ if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') {
+ $module = substr($module, 0, dol_strlen($module) - 4);
+ }
+ $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
+ foreach ($dirsociete as $dirroot) {
+ $res = dol_include_once($dirroot.$module.'.php');
+ if ($res) {
+ break;
+ }
}
$res = $thirdparty->create($user);
@@ -232,7 +249,7 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $thirdparty->error;
} else {
- // @todo creation of an attendee
+ // creation of an attendee
$confattendee = new ConferenceOrBoothAttendee($db);
$confattendee->fk_soc = $thirdparty->id;
$confattendee->date_subscription = dol_now();
@@ -372,70 +389,6 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
// Email
print ' |