2
0
forked from Wavyzz/dolibarr

Fix filter on current user is stupi on the view "per user".

This commit is contained in:
Laurent Destailleur
2020-02-06 21:16:48 +01:00
parent 19847ec7ac
commit fe0d1a81eb
2 changed files with 5 additions and 3 deletions

View File

@@ -49,10 +49,10 @@ $usergroup = GETPOST("search_usergroup", "int", 3) ?GETPOST("search_usergroup",
$showbirthday = 0;
// If not choice done on calendar owner, we filter on user.
if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
/*if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
{
$filtert = $user->id;
}
}*/
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');

View File

@@ -545,7 +545,9 @@ function calendars_prepare_head($param)
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:'');
$newparam = $param;
$newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
$head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($newparam?'?'.$newparam:'');
$head[$h][1] = $langs->trans("ViewPerUser");
$head[$h][2] = 'cardperuser';
$h++;