From a741186d2531fd46bc272d3a0609dedaa079f998 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Fri, 20 Dec 2019 11:42:42 +0100 Subject: [PATCH] Update Prints.php --- src/Prints.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Prints.php b/src/Prints.php index 2a59f8b1a..cb4f56fbb 100644 --- a/src/Prints.php +++ b/src/Prints.php @@ -125,6 +125,7 @@ class Prints $dbo = $database = database(); $infos = self::get($print); + $additional_checks = false; if (!$return_string) { Permissions::addModule($infos['id_module']); @@ -141,9 +142,11 @@ class Prints $has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true; } - if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) { - return false; - } + $additional_checks = !Permissions::check([], false) || !$has_access; + } + + if (empty($infos) || empty($infos['enabled']) || $additional_checks) { + return false; } // Individuazione della configurazione