diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 9f6ea1c74c9..03923f903a7 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -580,7 +580,7 @@ print '
'; print '| '.$langs->trans("Categories").' | '; print '';
print $form->showCategories($object->id, Categorie::TYPE_MEMBER, 1);
diff --git a/htdocs/bookcal/availabilities_agenda.php b/htdocs/bookcal/availabilities_agenda.php
index d3e7aa1a3a8..6054c5e4279 100644
--- a/htdocs/bookcal/availabilities_agenda.php
+++ b/htdocs/bookcal/availabilities_agenda.php
@@ -162,7 +162,7 @@ if ($object->id > 0) {
// Thirdparty
$morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/bookcal/availabilities_card.php b/htdocs/bookcal/availabilities_card.php index ca9fd3bf8db..6d21b777405 100644 --- a/htdocs/bookcal/availabilities_card.php +++ b/htdocs/bookcal/availabilities_card.php @@ -346,7 +346,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= ' '.$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/bookcal/availabilities_contact.php b/htdocs/bookcal/availabilities_contact.php index 8dfa04288f7..cef8bd0367c 100644 --- a/htdocs/bookcal/availabilities_contact.php +++ b/htdocs/bookcal/availabilities_contact.php @@ -144,7 +144,7 @@ if ($object->id) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/availabilities_document.php b/htdocs/bookcal/availabilities_document.php index 96700096ee6..301ccdc2eae 100644 --- a/htdocs/bookcal/availabilities_document.php +++ b/htdocs/bookcal/availabilities_document.php @@ -140,7 +140,7 @@ if ($object->id) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/availabilities_note.php b/htdocs/bookcal/availabilities_note.php index 27cdbbce880..dea5fee7625 100644 --- a/htdocs/bookcal/availabilities_note.php +++ b/htdocs/bookcal/availabilities_note.php @@ -118,7 +118,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/booking_agenda.php b/htdocs/bookcal/booking_agenda.php index 7fc3c68e105..87edd2113ac 100644 --- a/htdocs/bookcal/booking_agenda.php +++ b/htdocs/bookcal/booking_agenda.php @@ -162,7 +162,7 @@ if ($object->id > 0) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/bookcal/booking_card.php b/htdocs/bookcal/booking_card.php index 623bf142e60..fd8ddbc4614 100644 --- a/htdocs/bookcal/booking_card.php +++ b/htdocs/bookcal/booking_card.php @@ -342,7 +342,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) { + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref .= ' '.$langs->trans('Project') . ' '; if ($permissiontoadd) { diff --git a/htdocs/bookcal/booking_contact.php b/htdocs/bookcal/booking_contact.php index ceec965f5b2..e1954ce07a3 100644 --- a/htdocs/bookcal/booking_contact.php +++ b/htdocs/bookcal/booking_contact.php @@ -144,7 +144,7 @@ if ($object->id) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/booking_document.php b/htdocs/bookcal/booking_document.php index aadcb0f14c9..83031edec2b 100644 --- a/htdocs/bookcal/booking_document.php +++ b/htdocs/bookcal/booking_document.php @@ -140,7 +140,7 @@ if ($object->id) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/bookcal/booking_note.php b/htdocs/bookcal/booking_note.php index 5b00686fc27..a194d084fe1 100644 --- a/htdocs/bookcal/booking_note.php +++ b/htdocs/bookcal/booking_note.php @@ -118,7 +118,7 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->project->enabled)) + if (isModEnabled('project')) { $langs->load("projects"); $morehtmlref.=' '.$langs->trans('Project') . ' '; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index b6713c5e257..2bab31751c3 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -606,7 +606,7 @@ if ($object->id > 0) { } // Categories - if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) { $langs->load("categories"); print ' | ||||||||||
| '.$langs->trans("CustomersCategoriesShort").' | '; print ''; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index ac429de383f..95c7a630301 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1039,7 +1039,7 @@ if ($resql) { if (isModEnabled('categorie')) { // Categories - if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) { $langs->load('categories'); // Bank line diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index fd75c9ceaee..d8517391e17 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -588,7 +588,7 @@ if ($result) { print " | ||||||||||
| '.$form->editfieldkey('Categories', 'contcats', '', $object, 0).' | '; $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1); print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, null, null, '90%'); @@ -1157,7 +1157,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ' | ||||||||||
| '.$form->editfieldkey('Categories', 'contcats', '', $object, 0).' | '; print '';
@@ -1430,7 +1430,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '
| ||||||||||