Update modEventOrganization.class.php

This commit is contained in:
Laurent Destailleur 2022-07-29 15:39:37 +02:00 committed by GitHub
parent 75a8fdce11
commit 9cc9b84138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,21 +368,8 @@ class modEventOrganization extends DolibarrModules
}
}
$langs->load("eventorganization");
$cat = new Categorie($this->db);
$sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX.$cat->table_element."(label, type, entity, description, visible) VALUES('".$langs->trans('ApplicantOrVisitor')."', 2, 1, '".$langs->trans('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF')."', 1)";
$sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active) VALUES(300, 'conferenceorbooth', 'external', 'SPEAKER', '".$langs->trans('Speaker')."', 1)";
$init = $this->_init($sql, $options);
if (empty($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF)) {
$langs->load('eventorganization');
$res = $cat->fetch(null, $langs->trans('ApplicantOrVisitor'));
if ($cat->id) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF', $res);
}
}
return $init;
}