Update Prints.php

This commit is contained in:
Thomas Zilio 2019-12-20 11:42:42 +01:00
parent 00cb2eb2da
commit a741186d25
1 changed files with 6 additions and 3 deletions

View File

@ -125,6 +125,7 @@ class Prints
$dbo = $database = database(); $dbo = $database = database();
$infos = self::get($print); $infos = self::get($print);
$additional_checks = false;
if (!$return_string) { if (!$return_string) {
Permissions::addModule($infos['id_module']); Permissions::addModule($infos['id_module']);
@ -141,9 +142,11 @@ class Prints
$has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true; $has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true;
} }
if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) { $additional_checks = !Permissions::check([], false) || !$has_access;
return false;
} }
if (empty($infos) || empty($infos['enabled']) || $additional_checks) {
return false;
} }
// Individuazione della configurazione // Individuazione della configurazione