FIX missing check if category module is enabled
This commit is contained in:
parent
1d87f7f2b7
commit
4f6cf3f067
@ -611,7 +611,7 @@ if ($user->rights->adherent->creer) {
|
|||||||
if ($user->rights->adherent->supprimer) {
|
if ($user->rights->adherent->supprimer) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->societe->creer) {
|
if (isModEnabled('category') && $user->rights->adherent->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if ($user->rights->adherent->creer && $user->rights->user->user->creer) {
|
if ($user->rights->adherent->creer && $user->rights->user->user->creer) {
|
||||||
|
|||||||
@ -398,7 +398,7 @@ $arrayofmassactions = array(
|
|||||||
if ($user->rights->agenda->allactions->delete) {
|
if ($user->rights->agenda->allactions->delete) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->agenda->myactions->create) {
|
if (isModEnabled('category') && $user->rights->agenda->myactions->create) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||||
|
|||||||
@ -303,7 +303,7 @@ $arrayofmassactions = array(
|
|||||||
if ($permissiontodelete) {
|
if ($permissiontodelete) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->banque->modifier) {
|
if (isModEnabled('category') && $user->rights->banque->modifier) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||||
|
|||||||
@ -691,7 +691,7 @@ $arrayofmassactions = array(
|
|||||||
if ($user->rights->societe->supprimer) {
|
if ($user->rights->societe->supprimer) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->societe->creer) {
|
if (isModEnabled('category') && $user->rights->societe->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ if ($massaction == 'predelete') {
|
|||||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
|
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($massaction == 'preaffecttag') {
|
if ($massaction == 'preaffecttag' && isModEnabled('category')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$categ = new Categorie($db);
|
$categ = new Categorie($db);
|
||||||
$categ_types = array();
|
$categ_types = array();
|
||||||
|
|||||||
@ -427,7 +427,7 @@ if ($permissiontodelete) {
|
|||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->knowledgemanagement->knowledgerecord->write) {
|
if (isModEnabled('category') && $user->rights->knowledgemanagement->knowledgerecord->write) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -738,6 +738,8 @@ if ($resql) {
|
|||||||
if ($user->rights->{$rightskey}->creer) {
|
if ($user->rights->{$rightskey}->creer) {
|
||||||
$arrayofmassactions['switchonsalestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnSaleStatus");
|
$arrayofmassactions['switchonsalestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnSaleStatus");
|
||||||
$arrayofmassactions['switchonpurchasestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnPurchaseStatus");
|
$arrayofmassactions['switchonpurchasestatus'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SwitchOnPurchaseStatus");
|
||||||
|
}
|
||||||
|
if (isModEnabled('category') && $user->rights->{$rightskey}->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag', 'edit_extrafields'))) {
|
if (in_array($massaction, array('presend', 'predelete','preaffecttag', 'edit_extrafields'))) {
|
||||||
|
|||||||
@ -382,7 +382,7 @@ $arrayofmassactions = array(
|
|||||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||||
$arrayofmassactions = array();
|
$arrayofmassactions = array();
|
||||||
}
|
}
|
||||||
if ($user->rights->stock->creer) {
|
if (isModEnabled('category') && $user->rights->stock->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'label', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'label', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|||||||
@ -764,7 +764,7 @@ if ($user->rights->projet->creer) {
|
|||||||
if ($user->rights->projet->supprimer) {
|
if ($user->rights->projet->supprimer) {
|
||||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
}
|
}
|
||||||
if ($user->rights->projet->creer) {
|
if (isModEnabled('category') && $user->rights->projet->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
||||||
|
|||||||
@ -873,7 +873,7 @@ $arrayofmassactions = array(
|
|||||||
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
);
|
);
|
||||||
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||||
if ($user->rights->societe->creer) {
|
if (isModEnabled('category') && $user->rights->societe->creer) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
if ($user->rights->societe->creer) {
|
if ($user->rights->societe->creer) {
|
||||||
|
|||||||
@ -585,7 +585,7 @@ if ($permissiontoadd) {
|
|||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
$arrayofmassactions['reactivate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Reactivate");
|
$arrayofmassactions['reactivate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Reactivate");
|
||||||
}
|
}
|
||||||
if ($permissiontoadd) {
|
if (isModEnabled('category') && $permissiontoadd) {
|
||||||
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
|
||||||
}
|
}
|
||||||
//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user