Use isModEnabled
This commit is contained in:
parent
6c848333e6
commit
1dfcf8eceb
@ -2603,7 +2603,7 @@ function top_menu_bookmark()
|
|||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
// Define $bookmarks
|
// Define $bookmarks
|
||||||
if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) {
|
if (!isModEnabled('bookmark') || empty($user->rights->bookmark->lire)) {
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3304,7 +3304,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper to add log when clicking on download or preview
|
// Wrapper to add log when clicking on download or preview
|
||||||
if (!empty($conf->blockedlog->enabled) && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) {
|
if (isModEnabled('blockedlog') && is_object($object) && !empty($object->id) && $object->id > 0 && $object->statut > 0) {
|
||||||
if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture'
|
if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture'
|
||||||
print "\n<!-- JS CODE TO ENABLE log when making a download or a preview of a document -->\n";
|
print "\n<!-- JS CODE TO ENABLE log when making a download or a preview of a document -->\n";
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -153,7 +153,7 @@ if ($object->id > 0) {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
|
|||||||
@ -436,7 +436,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
$formquestion = array();
|
$formquestion = array();
|
||||||
if (!empty($conf->mrp->enabled)) {
|
if (isModEnabled('mrp')) {
|
||||||
$langs->load("mrp");
|
$langs->load("mrp");
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$morehtmlref .= $langs->trans('ThirdParty').' ';
|
$morehtmlref .= $langs->trans('ThirdParty').' ';
|
||||||
$morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
$morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
|
|||||||
@ -131,7 +131,7 @@ if ($object->id) {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
|
|||||||
@ -327,7 +327,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
$morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
|
||||||
// Project
|
// Project
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
$morehtmlref .= '<br>'.$langs->trans('Project').' ';
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
@ -605,7 +605,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (!empty($arrayfields['m.datem']['checked'])) {
|
if (!empty($arrayfields['m.datem']['checked'])) {
|
||||||
print '<td class="liste_titre nowraponall">';
|
print '<td class="liste_titre nowraponall">';
|
||||||
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
|
print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">';
|
||||||
if (empty($conf->productbatch->enabled)) {
|
if (!isModEnabled('productbatch')) {
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
//else print '<br>';
|
//else print '<br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user