diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 06759813e87..e73e83861c8 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -35,20 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('holiday', 'hrm')); -// Security check -$socid = 0; -$id = GETPOST('id', 'int'); - -if ($user->socid > 0) { // Protection if external user - //$socid = $user->socid; - accessforbidden(); -} -$result = restrictedArea($user, 'holiday', $id, ''); - $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; $massaction = GETPOST('massaction', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ'); $optioncss = GETPOST('optioncss', 'aZ'); +$socid = 0; +$id = GETPOST('id', 'int'); $search_ref = GETPOST('search_ref', 'alphanohtml'); $search_employee = GETPOST('search_employee', 'int'); @@ -76,6 +68,14 @@ $hookmanager->initHooks(array('leavemovementlist')); $arrayfields = array(); $arrayofmassactions = array(); +// Security check +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +$result = restrictedArea($user, 'holiday', $id, ''); + + /* * Actions */ @@ -352,9 +352,9 @@ print ''; if ($num == 0) { print '