From 7f9f67e7efadf8a732daa1e8c55a944af2617b70 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 23 Apr 2021 15:12:34 +0000 Subject: [PATCH] Fixing style errors. --- .../class/conferenceorbooth.class.php | 12 ++++---- .../conferenceorbooth_card.php | 2 +- htdocs/modulebuilder/template/admin/setup.php | 30 +++++++++---------- .../attendee_subscription.php | 3 +- htdocs/public/payment/newpayment.php | 1 - htdocs/public/project/index.php | 4 +-- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index b859c10a98d..02714496b35 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -237,19 +237,19 @@ class ConferenceOrBooth extends ActionComm */ 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); - + $encodedid = dol_encode($id, $dolibarr_main_instance_unique_id); $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); $link_subscription .= '&securekey='.urlencode($encodedsecurekey); - + $this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1); $this->pubregister = $link_subscription; - + $this->getActionCommFields(); return $result; } diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index fc232406ce9..f983994c4ec 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -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_soc']); // Hide field already shown in banner $keyforbreak='pubregister'; - + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; //var_dump($object); // Other attributes. Fields from hook formObjectOptions and Extrafields. diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 96f4d831261..21057347115 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -81,8 +81,8 @@ $arrayofparameters = array( //'MYMODULE_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1), //'MYMODULE_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1), //'MYMODULE_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1), - //'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1), - //'MYMODULE_MYPARAM7'=>array('type'=>'product', 'enabled'=>1), + //'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1), + //'MYMODULE_MYPARAM7'=>array('type'=>'product', 'enabled'=>1), ); $error = 0; @@ -296,13 +296,13 @@ if ($action == 'edit') { }); }); });'; - print ''; - } + print ''; + } } elseif ($val['type'] == 'product') { - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { - $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); - $form->select_produits($selected, $constname, '', 0); - } + if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); + $form->select_produits($selected, $constname, '', 0); + } } else { print ''; } @@ -370,13 +370,13 @@ if ($action == 'edit') { print $langs->trans("NorProspectNorCustomer"); } } elseif ($val['type'] == 'product') { - $product = new Product($db); - $resprod = $product->fetch($conf->global->{$constname}); - if ($resprod > 0) { - print $product->ref; - } elseif ($resprod < 0) { - setEventMessages(null, $object->errors, "errors"); - } + $product = new Product($db); + $resprod = $product->fetch($conf->global->{$constname}); + if ($resprod > 0) { + print $product->ref; + } elseif ($resprod < 0) { + setEventMessages(null, $object->errors, "errors"); + } } else { print $conf->global->{$constname}; } diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php index fab0a9733c8..40f238c90d6 100644 --- a/htdocs/public/eventorganization/attendee_subscription.php +++ b/htdocs/public/eventorganization/attendee_subscription.php @@ -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 // 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); Header("Location: ".$redirection); exit; @@ -379,7 +379,6 @@ if (empty($reshook) && $action == 'add') { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { 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 - } else { $redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 4460988ea60..b351367f6ea 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -120,7 +120,6 @@ if ($source == 'conferencesubscription') { if ($resultinvoice <= 0) { setEventMessages(null, $invoice->errors, "errors"); } else { - $invoice->fetchObjectLinked(); $linkedAttendees = $invoice->linkedObjectsIds['conferenceorboothattendee']; diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index ff6da63be9a..03f26ed2f37 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -193,13 +193,13 @@ print "\n"; // Show all action buttons print '
'; // Output introduction text -if($project->accept_conference_suggestions){ +if ($project->accept_conference_suggestions) { print ''; print '

'; } print ''; print '

'; -if($project->accept_booth_suggestions){ +if ($project->accept_booth_suggestions) { print ''; }