Clean code
This commit is contained in:
parent
af340ec133
commit
03941a59af
@ -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');
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
function opensurvey_prepare_head(Opensurveysondage $object)
|
||||
{
|
||||
|
||||
global $langs, $conf;
|
||||
|
||||
$h = 0;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user