Use isModEnabled
This commit is contained in:
parent
0dacfd3fac
commit
8ca01513d5
@ -73,7 +73,7 @@ if ($id > 0 || $ref) {
|
|||||||
$selectedvariant = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array();
|
$selectedvariant = !empty($_SESSION['addvariant_'.$object->id]) ? $_SESSION['addvariant_'.$object->id] : array();
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->variants->enabled)) {
|
if (!isModEnabled('variants')) {
|
||||||
accessforbidden('Module not enabled');
|
accessforbidden('Module not enabled');
|
||||||
}
|
}
|
||||||
if ($user->socid > 0) { // Protection if external user
|
if ($user->socid > 0) { // Protection if external user
|
||||||
|
|||||||
@ -137,7 +137,7 @@ $permissiontoadd = $user->rights->variants->write;
|
|||||||
$permissiontodelete = $user->rights->variants->delete;
|
$permissiontodelete = $user->rights->variants->delete;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->variants->enabled)) {
|
if (!isModEnabled('variants')) {
|
||||||
accessforbidden('Module not enabled');
|
accessforbidden('Module not enabled');
|
||||||
}
|
}
|
||||||
$socid = 0;
|
$socid = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user