From aeb59ebfdf5d534a040d764197f9e394736ade4f Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 26 May 2020 14:06:58 +0200 Subject: [PATCH] fix: class should not be accessed directly Signed-off-by: Thierry Bugier --- inc/conditionnableinterface.class.php | 4 ++++ inc/duplicatableinterface.class.php | 4 ++++ inc/questionparameter.class.php | 5 +++++ inc/questionparameterinterface.class.php | 3 +++ 4 files changed, 16 insertions(+) diff --git a/inc/conditionnableinterface.class.php b/inc/conditionnableinterface.class.php index 9df5b77e1..5288a6724 100644 --- a/inc/conditionnableinterface.class.php +++ b/inc/conditionnableinterface.class.php @@ -29,6 +29,10 @@ * --------------------------------------------------------------------- */ +if (!defined('GLPI_ROOT')) { + die("Sorry. You can't access this file directly"); +} + interface PluginFormcreatorConditionnableInterface { /** diff --git a/inc/duplicatableinterface.class.php b/inc/duplicatableinterface.class.php index cf3a48ddf..716e23fb6 100644 --- a/inc/duplicatableinterface.class.php +++ b/inc/duplicatableinterface.class.php @@ -29,6 +29,10 @@ * --------------------------------------------------------------------- */ +if (!defined('GLPI_ROOT')) { + die("Sorry. You can't access this file directly"); +} + interface PluginFormcreatorDuplicatableInterface { /** diff --git a/inc/questionparameter.class.php b/inc/questionparameter.class.php index 26dbb2a4f..8d1b32b1d 100644 --- a/inc/questionparameter.class.php +++ b/inc/questionparameter.class.php @@ -28,6 +28,11 @@ * @link http://plugins.glpi-project.org/#/plugin/formcreator * --------------------------------------------------------------------- */ + +if (!defined('GLPI_ROOT')) { + die("Sorry. You can't access this file directly"); +} + abstract class PluginFormcreatorQuestionParameter extends CommonDBChild implements PluginFormcreatorQuestionParameterInterface, PluginFormcreatorExportableInterface diff --git a/inc/questionparameterinterface.class.php b/inc/questionparameterinterface.class.php index 4067dd288..dc3acadd4 100644 --- a/inc/questionparameterinterface.class.php +++ b/inc/questionparameterinterface.class.php @@ -28,6 +28,9 @@ * @link http://plugins.glpi-project.org/#/plugin/formcreator * --------------------------------------------------------------------- */ +if (!defined('GLPI_ROOT')) { + die("Sorry. You can't access this file directly"); +} interface PluginFormcreatorQuestionParameterInterface { /**