use isModEnabled
This commit is contained in:
parent
8e66b7207e
commit
eb8097d81c
@ -319,16 +319,20 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
|
||||
$cursor = 10; // By default
|
||||
//if (!empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET;
|
||||
//if (!empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP;
|
||||
$level0 = $offset; if (!empty($conf->global->MAIN_METEO_LEVEL0)) {
|
||||
$level0 = $offset;
|
||||
if (!empty($conf->global->MAIN_METEO_LEVEL0)) {
|
||||
$level0 = $conf->global->MAIN_METEO_LEVEL0;
|
||||
}
|
||||
$level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) {
|
||||
$level1 = $offset + 1 * $cursor;
|
||||
if (!empty($conf->global->MAIN_METEO_LEVEL1)) {
|
||||
$level1 = $conf->global->MAIN_METEO_LEVEL1;
|
||||
}
|
||||
$level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) {
|
||||
$level2 = $offset + 2 * $cursor;
|
||||
if (!empty($conf->global->MAIN_METEO_LEVEL2)) {
|
||||
$level2 = $conf->global->MAIN_METEO_LEVEL2;
|
||||
}
|
||||
$level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) {
|
||||
$level3 = $offset + 3 * $cursor;
|
||||
if (!empty($conf->global->MAIN_METEO_LEVEL3)) {
|
||||
$level3 = $conf->global->MAIN_METEO_LEVEL3;
|
||||
}
|
||||
$text = ''; $options = 'class="valignmiddle" height="60px"';
|
||||
|
||||
@ -182,7 +182,7 @@ $elementList['user'] = img_picto('', 'user', 'class="pictofixedwidth"').dol_esca
|
||||
if (isModEnabled('adherent') && !empty($user->rights->adherent->lire)) {
|
||||
$elementList['member'] = img_picto('', 'object_member', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToMember'));
|
||||
}
|
||||
if (!empty($conf->recruitment->enabled) && !empty($user->rights->recruitment->recruitmentjobposition->read)) {
|
||||
if (isModEnabled('recruitment') && !empty($user->rights->recruitment->recruitmentjobposition->read)) {
|
||||
$elementList['recruitmentcandidature_send'] = img_picto('', 'recruitmentcandidature', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('RecruitmentCandidatures'));
|
||||
}
|
||||
if (isModEnabled("societe") && !empty($user->rights->societe->lire)) {
|
||||
|
||||
@ -7393,7 +7393,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__TICKET_USER_ASSIGN__'] = '__TICKET_USER_ASSIGN__';
|
||||
}
|
||||
|
||||
if (!empty($conf->recruitment->enabled) && (!is_object($object) || $object->element == 'recruitmentcandidature')) {
|
||||
if (isModEnabled('recruitment') && (!is_object($object) || $object->element == 'recruitmentcandidature')) {
|
||||
$substitutionarray['__CANDIDATE_FULLNAME__'] = '__CANDIDATE_FULLNAME__';
|
||||
$substitutionarray['__CANDIDATE_FIRSTNAME__'] = '__CANDIDATE_FIRSTNAME__';
|
||||
$substitutionarray['__CANDIDATE_LASTNAME__'] = '__CANDIDATE_LASTNAME__';
|
||||
|
||||
@ -372,7 +372,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
$langs->load("mrp");
|
||||
$rowspan++; $sectionauto[] = array('position'=>200, 'level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
}
|
||||
if (!empty($conf->recruitment->enabled)) {
|
||||
if (isModEnabled('recruitment')) {
|
||||
$langs->load("recruitment");
|
||||
$rowspan++; $sectionauto[] = array('position'=>210, 'level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ if (isModEnabled("banque")) {
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
$langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders")));
|
||||
}
|
||||
if (!empty($conf->recruitment->enabled)) {
|
||||
if (isModEnabled('recruitment')) {
|
||||
$langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications")));
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ if (isModEnabled('deplacement')) {
|
||||
if (isModEnabled('expensereport')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
}
|
||||
if (!empty($conf->recruitment->enabled)) {
|
||||
if (isModEnabled('recruitment')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
|
||||
}
|
||||
@ -342,7 +342,7 @@ if (isModEnabled('expensereport') && $user->rights->expensereport->lire) {
|
||||
|
||||
|
||||
// Last modified job position
|
||||
if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
$staticrecruitmentcandidature = new RecruitmentCandidature($db);
|
||||
$staticrecruitmentjobposition = new RecruitmentJobPosition($db);
|
||||
$sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
|
||||
|
||||
@ -242,7 +242,7 @@ print '<br>';
|
||||
|
||||
/* BEGIN MODULEBUILDER DRAFT MYOBJECT
|
||||
// Draft MyObject
|
||||
if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->read)
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->read)
|
||||
{
|
||||
$langs->load("orders");
|
||||
|
||||
@ -327,7 +327,7 @@ $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
// Last modified job position
|
||||
if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
$sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status, COUNT(rc.rowid) as nbapplications";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = s.rowid";
|
||||
@ -398,7 +398,7 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme
|
||||
}
|
||||
|
||||
// Last modified job position
|
||||
if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
if (isModEnabled('recruitment') && $user->rights->recruitment->recruitmentjobposition->read) {
|
||||
$sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s ON rc.fk_recruitmentjobposition = s.rowid";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user