Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-13 10:06:42 +00:00
parent 14e64f4a33
commit 839edb5abe
2 changed files with 13 additions and 13 deletions

View File

@ -494,13 +494,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
//unset($object->fields['fk_project']); // Hide field already shown in banner //unset($object->fields['fk_project']); // Hide field already shown in banner
//unset($object->fields['fk_soc']); // Hide field already shown in banner //unset($object->fields['fk_soc']); // Hide field already shown in banner
global $dolibarr_main_url_root; global $dolibarr_main_url_root;
$encodedid = dol_encode($id, $dolibarr_main_instance_unique_id); $encodedid = dol_encode($id, $dolibarr_main_instance_unique_id);
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$encodedid; $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$encodedid;
$encodedsecurekey = dol_encode($conf->global->EVENTORGANIZATION_SECUREKEY.$encodedid, $dolibarr_main_instance_unique_id); $encodedsecurekey = dol_encode($conf->global->EVENTORGANIZATION_SECUREKEY.$encodedid, $dolibarr_main_instance_unique_id);
$link_subscription .= '&securekey='.urlencode($encodedsecurekey); $link_subscription .= '&securekey='.urlencode($encodedsecurekey);
$object->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1); $object->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
$object->pubregister = $link_subscription; $object->pubregister = $link_subscription;
$keyforbreak='pubregister'; $keyforbreak='pubregister';

View File

@ -87,7 +87,7 @@ $securekeyandid = dol_decode($encodedsecurekeyandid, $dolibarr_main_instance_uni
// Securekey decomposition into pure securekey and id added at the end // Securekey decomposition into pure securekey and id added at the end
$securekey = substr($securekeyandid, 0, strlen($securekeyandid)-strlen($encodedid)); $securekey = substr($securekeyandid, 0, strlen($securekeyandid)-strlen($encodedid));
$idgotfromsecurekey = dol_decode(substr($securekeyandid, -strlen($encodedid), strlen($encodedid)),$dolibarr_main_instance_unique_id); $idgotfromsecurekey = dol_decode(substr($securekeyandid, -strlen($encodedid), strlen($encodedid)), $dolibarr_main_instance_unique_id);
// We check if the securekey collected is OK and if the id collected is the same than the id in the securekey // We check if the securekey collected is OK and if the id collected is the same than the id in the securekey
if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY || $idgotfromsecurekey != $id) { if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY || $idgotfromsecurekey != $id) {
@ -203,14 +203,14 @@ if (empty($reshook) && $action == 'add') {
$errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n"; $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n";
} }
if (!GETPOST("country_id")) { if (!GETPOST("country_id")) {
$error++; $error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."<br>\n"; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."<br>\n";
} }
if (!$error) { if (!$error) {
// Vérifier si client existe par l'email // Vérifier si client existe par l'email
$thirdparty = new Societe($db); $thirdparty = new Societe($db);
$resultfetchthirdparty = $thirdparty->fetch('','','','','','','','','','',$email); $resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $email);
if ($resultfetchthirdparty<0) { if ($resultfetchthirdparty<0) {
$error++; $error++;
@ -218,12 +218,12 @@ if (empty($reshook) && $action == 'add') {
$readythirdparty = -1; $readythirdparty = -1;
} elseif ($resultfetchthirdparty==0) { } elseif ($resultfetchthirdparty==0) {
// creation of a new thirdparty // creation of a new thirdparty
if(!empty(GETPOST("societe"))){ if (!empty(GETPOST("societe"))) {
$thirdparty->name = GETPOST("societe"); $thirdparty->name = GETPOST("societe");
} else { } else {
$thirdparty->name = $email; $thirdparty->name = $email;
} }
$thirdparty->address = GETPOST("address"); $thirdparty->address = GETPOST("address");
$thirdparty->zip = GETPOST("zipcode"); $thirdparty->zip = GETPOST("zipcode");
$thirdparty->town = GETPOST("town"); $thirdparty->town = GETPOST("town");