Merge branch '12.0' into 13.0
This commit is contained in:
commit
f8ef2a352f
@ -261,6 +261,9 @@ $parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
$rightskey = 'produit';
|
||||
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Selection of new fields
|
||||
@ -299,8 +302,8 @@ if (empty($reshook))
|
||||
if ((string) $search_type == '1') { $objectlabel = 'Services'; }
|
||||
if ((string) $search_type == '0') { $objectlabel = 'Products'; }
|
||||
|
||||
$permissiontoread = $user->rights->produit->lire;
|
||||
$permissiontodelete = $user->rights->produit->supprimer;
|
||||
$permissiontoread = $user->rights->{$rightskey}->lire;
|
||||
$permissiontodelete = $user->rights->{$rightskey}->supprimer;
|
||||
$uploaddir = $conf->product->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
@ -530,8 +533,6 @@ if ($resql)
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
//'presend'=>$langs->trans("SendByMail"),
|
||||
);
|
||||
$rightskey = 'produit';
|
||||
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
|
||||
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user