diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 33025dd1551c5..a8502498e4111 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -167,7 +167,7 @@ print ''; print ''; -if (! empty($conf->categorie->enabled)) +if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '
'; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 3cf38a58b90a6..84fc4326fe465 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -159,7 +159,7 @@ print ''; print ''; -if (! empty($conf->categorie->enabled)) +if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe';