Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/holiday/card.php
This commit is contained in:
commit
b19593bb8e
@ -48,10 +48,6 @@ $id=GETPOST('id', 'int');
|
|||||||
$ref=GETPOST('ref', 'alpha');
|
$ref=GETPOST('ref', 'alpha');
|
||||||
$fuserid = (GETPOST('fuserid', 'int')?GETPOST('fuserid', 'int'):$user->id);
|
$fuserid = (GETPOST('fuserid', 'int')?GETPOST('fuserid', 'int'):$user->id);
|
||||||
|
|
||||||
// Protection if external user
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
|
||||||
$result = restrictedArea($user, 'holiday', $id, 'holiday');
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("holiday","mails"));
|
$langs->loadLangs(array("holiday","mails"));
|
||||||
|
|
||||||
@ -65,14 +61,15 @@ if (! empty($conf->global->HOLIDAY_FOR_NON_SALARIES_TOO)) $morefilter = '';
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$object = new Holiday($db);
|
$object = new Holiday($db);
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
if ($id > 0)
|
if (($id > 0) || $ref)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id, $ref);
|
||||||
|
|
||||||
// Check current user can read this leave request
|
// Check current user can read this leave request
|
||||||
$canread = 0;
|
$canread = 0;
|
||||||
@ -92,6 +89,10 @@ $candelete = 0;
|
|||||||
if (! empty($user->rights->holiday->delete)) $candelete=1;
|
if (! empty($user->rights->holiday->delete)) $candelete=1;
|
||||||
if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) $candelete=1;
|
if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) $candelete=1;
|
||||||
|
|
||||||
|
// Protection if external user
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result = restrictedArea($user, 'holiday', $object->id, 'holiday');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user