Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-23 15:12:34 +00:00
parent e9b35cf36b
commit 7f9f67e7ef
6 changed files with 25 additions and 27 deletions

View File

@ -237,19 +237,19 @@ class ConferenceOrBooth extends ActionComm
*/ */
public function fetch($id, $ref = null, $ref_ext = '', $email_msgid = '') public function fetch($id, $ref = null, $ref_ext = '', $email_msgid = '')
{ {
global $dolibarr_main_url_root, $dolibarr_main_instance_unique_id, $conf, $langs; global $dolibarr_main_url_root, $dolibarr_main_instance_unique_id, $conf, $langs;
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid); $result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
$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);
$this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1); $this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);
$this->pubregister = $link_subscription; $this->pubregister = $link_subscription;
$this->getActionCommFields(); $this->getActionCommFields();
return $result; return $result;
} }

View File

@ -494,7 +494,7 @@ 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
$keyforbreak='pubregister'; $keyforbreak='pubregister';
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
//var_dump($object); //var_dump($object);
// Other attributes. Fields from hook formObjectOptions and Extrafields. // Other attributes. Fields from hook formObjectOptions and Extrafields.

View File

@ -81,8 +81,8 @@ $arrayofparameters = array(
//'MYMODULE_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1), //'MYMODULE_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1),
//'MYMODULE_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1), //'MYMODULE_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1),
//'MYMODULE_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1), //'MYMODULE_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1),
//'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1), //'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1),
//'MYMODULE_MYPARAM7'=>array('type'=>'product', 'enabled'=>1), //'MYMODULE_MYPARAM7'=>array('type'=>'product', 'enabled'=>1),
); );
$error = 0; $error = 0;
@ -296,13 +296,13 @@ if ($action == 'edit') {
}); });
}); });
});'; });';
print '</script>'; print '</script>';
} }
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
$form->select_produits($selected, $constname, '', 0); $form->select_produits($selected, $constname, '', 0);
} }
} else { } else {
print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->{$constname}.'">'; print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->{$constname}.'">';
} }
@ -370,13 +370,13 @@ if ($action == 'edit') {
print $langs->trans("NorProspectNorCustomer"); print $langs->trans("NorProspectNorCustomer");
} }
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
$product = new Product($db); $product = new Product($db);
$resprod = $product->fetch($conf->global->{$constname}); $resprod = $product->fetch($conf->global->{$constname});
if ($resprod > 0) { if ($resprod > 0) {
print $product->ref; print $product->ref;
} elseif ($resprod < 0) { } elseif ($resprod < 0) {
setEventMessages(null, $object->errors, "errors"); setEventMessages(null, $object->errors, "errors");
} }
} else { } else {
print $conf->global->{$constname}; print $conf->global->{$constname};
} }

View File

@ -250,7 +250,7 @@ if (empty($reshook) && $action == 'add') {
// At this point, we have an attendee. It may not be linked to a thirdparty if we just created it // At this point, we have an attendee. It may not be linked to a thirdparty if we just created it
// If the attendee has already paid // If the attendee has already paid
if($confattendee->status == 1) { if ($confattendee->status == 1) {
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?securekey='.dol_encode($conf->global->EVENTORGANIZATION_SECUREKEY, $dolibarr_main_instance_unique_id); $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?securekey='.dol_encode($conf->global->EVENTORGANIZATION_SECUREKEY, $dolibarr_main_instance_unique_id);
Header("Location: ".$redirection); Header("Location: ".$redirection);
exit; exit;
@ -379,7 +379,6 @@ if (empty($reshook) && $action == 'add') {
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
$redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical $redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical
} else { } else {
$redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; $redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
} }

View File

@ -120,7 +120,6 @@ if ($source == 'conferencesubscription') {
if ($resultinvoice <= 0) { if ($resultinvoice <= 0) {
setEventMessages(null, $invoice->errors, "errors"); setEventMessages(null, $invoice->errors, "errors");
} else { } else {
$invoice->fetchObjectLinked(); $invoice->fetchObjectLinked();
$linkedAttendees = $invoice->linkedObjectsIds['conferenceorboothattendee']; $linkedAttendees = $invoice->linkedObjectsIds['conferenceorboothattendee'];

View File

@ -193,13 +193,13 @@ print "\n";
// Show all action buttons // Show all action buttons
print '<br>'; print '<br>';
// Output introduction text // Output introduction text
if($project->accept_conference_suggestions){ if ($project->accept_conference_suggestions) {
print '<input type="submit" value="'.$langs->trans("SuggestConference").'" id="suggestconference" class="button">'; print '<input type="submit" value="'.$langs->trans("SuggestConference").'" id="suggestconference" class="button">';
print '<br><br>'; print '<br><br>';
} }
print '<input type="submit" value="'.$langs->trans("ViewAndVote").'" id="viewandvote" class="button">'; print '<input type="submit" value="'.$langs->trans("ViewAndVote").'" id="viewandvote" class="button">';
print '<br><br>'; print '<br><br>';
if($project->accept_booth_suggestions){ if ($project->accept_booth_suggestions) {
print '<input type="submit" value="'.$langs->trans("SuggestBooth").'" id="suggestbooth" class="button">'; print '<input type="submit" value="'.$langs->trans("SuggestBooth").'" id="suggestbooth" class="button">';
} }