mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Use isModEnabled
This commit is contained in:
parent
cce6d82741
commit
0dacfd3fac
|
|
@ -26,7 +26,7 @@ $langs->loadLangs(array("admin", "products"));
|
|||
$action = GETPOST('action', 'alphanohtml');
|
||||
|
||||
// Security check
|
||||
if (!$user->admin || empty($conf->variants->enabled)) {
|
||||
if (!$user->admin || !isModEnabled('variants')) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->variants->enabled)) {
|
||||
if (!isModEnabled('variants')) {
|
||||
accessforbidden('Module not enabled');
|
||||
}
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->variants->enabled)) {
|
||||
if (!isModEnabled('variants')) {
|
||||
accessforbidden('Module not enabled');
|
||||
}
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ require '../../main.inc.php';
|
|||
require DOL_DOCUMENT_ROOT . '/variants/class/ProductAttribute.class.php';
|
||||
|
||||
// Security check
|
||||
if (empty($conf->variants->enabled)) {
|
||||
if (!isModEnabled('variants')) {
|
||||
accessforbidden('Module not enabled');
|
||||
}
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
|||
$lineid = GETPOST('lineid', 'alpha');
|
||||
|
||||
// Security check
|
||||
if (empty($conf->variants->enabled)) {
|
||||
if (!isModEnabled('variants')) {
|
||||
accessforbidden('Module not enabled');
|
||||
}
|
||||
if ($user->socid > 0) { // Protection if external user
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user