diff --git a/htdocs/public/opensurvey/index.php b/htdocs/public/opensurvey/index.php index 568e6374f95..a89b3116b33 100644 --- a/htdocs/public/opensurvey/index.php +++ b/htdocs/public/opensurvey/index.php @@ -79,8 +79,8 @@ $object = new Opensurveysondage($db); $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost. // Security check -if (empty($conf->recruitment->enabled)) { - httponly_accessforbidden('Module Recruitment not enabled'); +if (!isModEnabled('opensurvey')) { + httponly_accessforbidden('Module Opensurvey not enabled'); }