Fixing style errors.
This commit is contained in:
parent
a58e0ac8ac
commit
2b58bc904b
@ -60,7 +60,7 @@ $arrayofparameters = array(
|
|||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1),
|
||||||
'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1),
|
'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1),
|
||||||
);
|
);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
@ -81,8 +81,8 @@ $id = dol_decode(GETPOST('id'), $key);
|
|||||||
// Securekey check
|
// Securekey check
|
||||||
$securekey = GETPOST('securekey', 'alpha');
|
$securekey = GETPOST('securekey', 'alpha');
|
||||||
if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY) {
|
if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY) {
|
||||||
print $langs->trans('MissingOrBadSecureKey');
|
print $langs->trans('MissingOrBadSecureKey');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load translation files
|
// Load translation files
|
||||||
@ -183,8 +183,8 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
|
|
||||||
|
|
||||||
if (!GETPOST("email")) {
|
if (!GETPOST("email")) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."<br>\n";
|
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."<br>\n";
|
||||||
}
|
}
|
||||||
if (!GETPOST("societe")) {
|
if (!GETPOST("societe")) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -202,62 +202,60 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
$nomsociete = GETPOST("societe");
|
$nomsociete = GETPOST("societe");
|
||||||
$resultfetchthirdparty = $thirdparty->fetch('', $nomsociete);
|
$resultfetchthirdparty = $thirdparty->fetch('', $nomsociete);
|
||||||
|
|
||||||
if($resultfetchthirdparty<0){
|
if ($resultfetchthirdparty<0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $thirdparty->error;
|
$errmsg .= $thirdparty->error;
|
||||||
$readythirdparty = -1;
|
$readythirdparty = -1;
|
||||||
|
} elseif ($resultfetchthirdparty==0) {
|
||||||
|
// creation of a new thirdparty
|
||||||
|
$thirdparty->name = $nomsociete;
|
||||||
|
$thirdparty->address = GETPOST("address");
|
||||||
|
$thirdparty->zip = GETPOST("zipcode");
|
||||||
|
$thirdparty->town = GETPOST("town");
|
||||||
|
$thirdparty->client = 2;
|
||||||
|
$thirdparty->fournisseur = 0;
|
||||||
|
$thirdparty->country_id = GETPOST("country_id", 'int');
|
||||||
|
$thirdparty->state_id = GETPOST("state_id", 'int');
|
||||||
|
|
||||||
} elseif($resultfetchthirdparty==0){
|
// Load object modCodeTiers
|
||||||
// creation of a new thirdparty
|
$module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard');
|
||||||
$thirdparty->name = $nomsociete;
|
if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') {
|
||||||
$thirdparty->address = GETPOST("address");
|
$module = substr($module, 0, dol_strlen($module) - 4);
|
||||||
$thirdparty->zip = GETPOST("zipcode");
|
}
|
||||||
$thirdparty->town = GETPOST("town");
|
$dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']);
|
||||||
$thirdparty->client = 2;
|
foreach ($dirsociete as $dirroot) {
|
||||||
$thirdparty->fournisseur = 0;
|
$res = dol_include_once($dirroot.$module.'.php');
|
||||||
$thirdparty->country_id = GETPOST("country_id", 'int');
|
if ($res) {
|
||||||
$thirdparty->state_id = GETPOST("state_id", 'int');
|
break;
|
||||||
|
}
|
||||||
// Load object modCodeTiers
|
}
|
||||||
$module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard');
|
$modCodeClient = new $module($db);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$modCodeClient = new $module($db);
|
|
||||||
|
|
||||||
if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
|
|
||||||
$tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
|
|
||||||
}
|
|
||||||
$thirdparty->code_client = $tmpcode;
|
|
||||||
$readythirdparty = $thirdparty->create($user);
|
|
||||||
|
|
||||||
|
if (empty($tmpcode) && !empty($modCodeClient->code_auto)) {
|
||||||
|
$tmpcode = $modCodeClient->getNextValue($thirdparty, 0);
|
||||||
|
}
|
||||||
|
$thirdparty->code_client = $tmpcode;
|
||||||
|
$readythirdparty = $thirdparty->create($user);
|
||||||
} else {
|
} else {
|
||||||
// We have an existing thirdparty ready to use
|
// We have an existing thirdparty ready to use
|
||||||
$readythirdparty = 1;
|
$readythirdparty = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($readythirdparty < 0){
|
if ($readythirdparty < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $thirdparty->error;
|
$errmsg .= $thirdparty->error;
|
||||||
} else {
|
} else {
|
||||||
// creation of an attendee
|
// creation of an attendee
|
||||||
$confattendee = new ConferenceOrBoothAttendee($db);
|
$confattendee = new ConferenceOrBoothAttendee($db);
|
||||||
$confattendee->fk_soc = $thirdparty->id;
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
$confattendee->date_subscription = dol_now();
|
$confattendee->date_subscription = dol_now();
|
||||||
$confattendee->email = GETPOST("email");
|
$confattendee->email = GETPOST("email");
|
||||||
$confattendee->fk_actioncomm = $id;
|
$confattendee->fk_actioncomm = $id;
|
||||||
$resultconfattendee = $confattendee->create($user);
|
$resultconfattendee = $confattendee->create($user);
|
||||||
if ($resultconfattendee < 0){
|
if ($resultconfattendee < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $confattendee->error;
|
$errmsg .= $confattendee->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,8 +278,8 @@ $formcompany = new FormCompany($db);
|
|||||||
|
|
||||||
$conference = new ConferenceOrBooth($db);
|
$conference = new ConferenceOrBooth($db);
|
||||||
$resultconf = $conference->fetch($id);
|
$resultconf = $conference->fetch($id);
|
||||||
if ($resultconf < 0){
|
if ($resultconf < 0) {
|
||||||
setEventMessages(null, $object->errors, "errors");
|
setEventMessages(null, $object->errors, "errors");
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeaderVierge($langs->trans("NewSubscription"));
|
llxHeaderVierge($langs->trans("NewSubscription"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user