Use isModEnabled
This commit is contained in:
parent
9dec4c9042
commit
2c9047661e
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
|
||||||
if (!empty($conf->category->enabled)) {
|
if (isModEnabled('categorie')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ $endyear = $year;
|
|||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
if (!empty($conf->category->enabled)) {
|
if (isModEnabled('categorie')) {
|
||||||
$langs->load('categories');
|
$langs->load('categories');
|
||||||
}
|
}
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -299,7 +299,7 @@ if ($user->admin) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
// Category
|
||||||
if (!empty($conf->category->enabled)) {
|
if (isModEnabled('categorie')) {
|
||||||
if ($mode == 'customer') {
|
if ($mode == 'customer') {
|
||||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user