Merge pull request #25023 from frederic34/20230609

use user hasRight, isModEnabled
This commit is contained in:
Laurent Destailleur
2023-06-09 15:31:13 +02:00
committed by GitHub
65 changed files with 90 additions and 90 deletions

View File

@@ -230,7 +230,7 @@ if ($action == 'edit') {
print "</textarea>\n";
} elseif ($val['type']== 'html') {
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
$doleditor->Create();
} elseif ($val['type'] == 'yesno') {
print $form->selectyesno($constname, getDolGlobalString($constname), 1);

View File

@@ -236,7 +236,7 @@ if (isModEnabled('agenda')) {
if (isModEnabled('eventorganization') && !empty($user->rights->eventorganization->read)) {
$elementList['conferenceorbooth'] = img_picto('', 'action', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization'));
}
if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) {
if (isModEnabled('partnership') && !empty($user->rights->partnership->read)) {
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="pictofixedwidth"').dol_escape_htmltag($langs->trans('MailToPartnership'));
}

View File

@@ -539,14 +539,14 @@ print '<br>';
print '<br>';
print load_fiche_titre($langs->trans("API"), '', 'folder');
if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
if (!isModEnabled('api') && !isModEnabled('webservices')) {
print $langs->trans("APIsAreNotEnabled");
} else {
if (!empty($conf->webservices->enabled)) {
if (isModEnabled('webservices')) {
print $langs->trans('YouEnableDeprecatedWSAPIsUseRESTAPIsInstead')."<br>\n";
print '<br>';
}
if (!empty($conf->api->enabled)) {
if (isModEnabled('api')) {
print '<strong>API_ENDPOINT_RULES</strong> = '.getDolGlobalString('API_ENDPOINT_RULES', '<span class="opacitymedium">'.$langs->trans("Undefined").' &nbsp; ('.$langs->trans("Example").': login:0,users:0,setup:1,status:1,tickets:1,...)</span>')."<br>\n";
print '<br>';
}

View File

@@ -226,7 +226,7 @@ if ($action == 'edit') {
print "</textarea>\n";
} elseif ($val['type']== 'html') {
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
$doleditor->Create();
} elseif ($val['type'] == 'yesno') {
print $form->selectyesno($constname, getDolGlobalString($constname), 1);