Laurent Destailleur 4 yıl önce
ebeveyn
işleme
03941a59af

+ 3 - 1
htdocs/opensurvey/card.php

@@ -32,7 +32,9 @@ require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php";
 
 
 // Security check
-if (!$user->rights->opensurvey->read) accessforbidden();
+if (empty($user->rights->opensurvey->read)) {
+	accessforbidden();
+}
 
 // Initialisation des variables
 $action = GETPOST('action', 'aZ09');

+ 3 - 1
htdocs/opensurvey/exportcsv.php

@@ -40,7 +40,9 @@ $result = $object->fetch(0, $numsondage);
 if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage);
 
 // Security check
-if (!$user->rights->opensurvey->read) accessforbidden();
+if (empty($user->rights->opensurvey->read)) {
+	accessforbidden();
+}
 
 
 /*

+ 0 - 1
htdocs/opensurvey/fonctions.php

@@ -31,7 +31,6 @@
  */
 function opensurvey_prepare_head(Opensurveysondage $object)
 {
-
 	global $langs, $conf;
 
 	$h = 0;

+ 3 - 1
htdocs/opensurvey/index.php

@@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
 $langs->load("opensurvey");
 
 // Security check
-if (!$user->rights->opensurvey->read) accessforbidden();
+if (empty($user->rights->opensurvey->read)) {
+	accessforbidden();
+}
 
 $hookmanager = new HookManager($db);
 

+ 3 - 3
htdocs/opensurvey/results.php

@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
 require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php";
 require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php";
 
-
 // Security check
-if (!$user->rights->opensurvey->read) accessforbidden();
-
+if (empty($user->rights->opensurvey->read)) {
+	accessforbidden();
+}
 
 // Init vars
 $action = GETPOST('action', 'aZ09');