Use isModEnabled
This commit is contained in:
parent
86163ff430
commit
5d19588037
@ -170,7 +170,7 @@ if ($resql) {
|
|||||||
/*
|
/*
|
||||||
* Draft orders
|
* Draft orders
|
||||||
*/
|
*/
|
||||||
if (!empty($conf->ficheinter->enabled)) {
|
if (isModEnabled('ficheinter')) {
|
||||||
$sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid";
|
$sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
@ -293,7 +293,7 @@ if ($resql) {
|
|||||||
* interventions to process
|
* interventions to process
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($conf->ficheinter->enabled)) {
|
if (isModEnabled('ficheinter')) {
|
||||||
$sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid";
|
$sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
|
|||||||
@ -1369,7 +1369,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
print dolGetButtonAction('', $langs->trans('AddSupplierInvoice'), 'default', DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
print dolGetButtonAction('', $langs->trans('AddSupplierInvoice'), 'default', DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||||
}
|
}
|
||||||
if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) {
|
if (isModEnabled('ficheinter') && $user->rights->ficheinter->creer) {
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
print dolGetButtonAction('', $langs->trans('AddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid, '', 1, array('isDropDown' => true));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ if ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMO
|
|||||||
if (isModEnabled('contrat')) {
|
if (isModEnabled('contrat')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
}
|
}
|
||||||
if (!empty($conf->ficheinter->enabled)) {
|
if (isModEnabled('ficheinter')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||||
}
|
}
|
||||||
if (isModEnabled("expedition")) {
|
if (isModEnabled("expedition")) {
|
||||||
@ -114,7 +114,7 @@ if (isModEnabled('commande')) {
|
|||||||
if (isModEnabled("propal")) {
|
if (isModEnabled("propal")) {
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
}
|
}
|
||||||
if (!empty($conf->ficheinter->enabled)) {
|
if (isModEnabled('ficheinter')) {
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
}
|
}
|
||||||
if (isModEnabled('deplacement')) {
|
if (isModEnabled('deplacement')) {
|
||||||
|
|||||||
@ -1060,7 +1060,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) {
|
if ( isModEnabled('ficheinter') && $user->rights->ficheinter->creer) {
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
$arrayofmassactions['generateinter'] = $langs->trans("GenerateInter");
|
$arrayofmassactions['generateinter'] = $langs->trans("GenerateInter");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,7 @@ if ($object->client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->ficheinter->enabled) && !empty($user->rights->ficheinter->lire)) {
|
if (isModEnabled('ficheinter') && !empty($user->rights->ficheinter->lire)) {
|
||||||
$elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions');
|
$elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -199,7 +199,7 @@ if (isModEnabled('holiday') || isModEnabled('expensereport')) {
|
|||||||
if (isModEnabled("product") || isModEnabled("service")) {
|
if (isModEnabled("product") || isModEnabled("service")) {
|
||||||
$tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea';
|
$tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea';
|
||||||
}
|
}
|
||||||
if (isModEnabled("propal") || isModEnabled('commande') || !empty($conf->ficheinter->enabled) || isModEnabled('contrat')) {
|
if (isModEnabled("propal") || isModEnabled('commande') || isModEnabled('ficheinter') || isModEnabled('contrat')) {
|
||||||
$tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea';
|
$tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea';
|
||||||
}
|
}
|
||||||
if (!empty($conf->comptabilite->enabled) || isModEnabled('accounting')) {
|
if (!empty($conf->comptabilite->enabled) || isModEnabled('accounting')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user