diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 0480a22a59a..0f149a4dd6a 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -73,7 +73,7 @@ if ($id > 0 || $ref) { $selectedvariant = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array(); // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } if ($user->socid > 0) { // Protection if external user diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 930b01ff4e2..c2f2b3e9a15 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -137,7 +137,7 @@ $permissiontoadd = $user->rights->variants->write; $permissiontodelete = $user->rights->variants->delete; // Security check -if (empty($conf->variants->enabled)) { +if (!isModEnabled('variants')) { accessforbidden('Module not enabled'); } $socid = 0;