Fix filter
This commit is contained in:
parent
a93d240d5e
commit
57924a630e
1 changed files with 11 additions and 1 deletions
|
|
@ -49,10 +49,12 @@ if (!isset($id) || empty($id)) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
if (GETPOST('actioncode', 'array')) {
|
||||
if (GETPOSTISARRAY('actioncode')) {
|
||||
$actioncode = GETPOST('actioncode', 'array:alpha', 3);
|
||||
if (!count($actioncode)) {
|
||||
$actioncode = '0';
|
||||
} else {
|
||||
$actioncode = implode(',', $actioncode);
|
||||
}
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT'));
|
||||
|
|
@ -81,6 +83,9 @@ if (!$sortorder) {
|
|||
$object = new User($db);
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$result = $object->fetch($id, $ref, '', 1);
|
||||
if ($result <= 0) {
|
||||
accessforbidden('User not found');
|
||||
}
|
||||
$object->loadRights();
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +103,11 @@ if (($object->id != $user->id) && !$user->hasRight('user', 'user', 'lire')) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array('id' => $id);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue