mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 11:15:21 +01:00
Tracking $conf->module->enabled part 2 (#31899)
Co-authored-by: Theobald <f.moreau@theobald-groupe.com>
This commit is contained in:
@@ -402,8 +402,8 @@ class Propal extends CommonObject
|
||||
'fk_delivery_address' => array('type' => 'integer', 'label' => 'DeliveryAddress', 'enabled' => 1, 'visible' => 0, 'position' => 200), // deprecated
|
||||
'fk_input_reason' => array('type' => 'integer', 'label' => 'InputReason', 'enabled' => 1, 'visible' => -1, 'position' => 205),
|
||||
'extraparams' => array('type' => 'varchar(255)', 'label' => 'Extraparams', 'enabled' => 1, 'visible' => -1, 'position' => 215),
|
||||
'fk_incoterms' => array('type' => 'integer', 'label' => 'IncotermCode', 'enabled' => '$conf->incoterm->enabled', 'visible' => -1, 'position' => 220),
|
||||
'location_incoterms' => array('type' => 'varchar(255)', 'label' => 'IncotermLabel', 'enabled' => '$conf->incoterm->enabled', 'visible' => -1, 'position' => 225),
|
||||
'fk_incoterms' => array('type' => 'integer', 'label' => 'IncotermCode', 'enabled' => 'isModEnabled("incoterm")', 'visible' => -1, 'position' => 220),
|
||||
'location_incoterms' => array('type' => 'varchar(255)', 'label' => 'IncotermLabel', 'enabled' => 'isModEnabled("incoterm")', 'visible' => -1, 'position' => 225),
|
||||
'fk_multicurrency' => array('type' => 'integer', 'label' => 'MulticurrencyID', 'enabled' => 1, 'visible' => -1, 'position' => 230),
|
||||
'multicurrency_code' => array('type' => 'varchar(255)', 'label' => 'MulticurrencyCurrency', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -1, 'position' => 235),
|
||||
'multicurrency_tx' => array('type' => 'double(24,8)', 'label' => 'MulticurrencyRate', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -1, 'position' => 240, 'isameasure' => 1),
|
||||
|
||||
@@ -97,7 +97,7 @@ $bookmarkList = '';
|
||||
$searchForm = '';
|
||||
|
||||
|
||||
if (empty($conf->bookmark->enabled)) {
|
||||
if (!isModEnabled('bookmark')) {
|
||||
$langs->load("admin");
|
||||
$bookmarkList .= '<br><span class="opacitymedium">'.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Bookmarks")).'</span>';
|
||||
$bookmarkList .= '<br><br>';
|
||||
|
||||
@@ -507,7 +507,7 @@ class FormFile
|
||||
$printer = 0;
|
||||
// The direct print feature is implemented only for such elements
|
||||
if (in_array($modulepart, array('contract', 'facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) {
|
||||
$printer = ($user->hasRight('printing', 'read') && !empty($conf->printing->enabled));
|
||||
$printer = ($user->hasRight('printing', 'read') && isModEnabled('printing'));
|
||||
}
|
||||
|
||||
$hookmanager->initHooks(array('formfile'));
|
||||
|
||||
@@ -43,7 +43,7 @@ function contact_prepare_head(Contact $object)
|
||||
$head[$tab][2] = 'card';
|
||||
$tab++;
|
||||
|
||||
if ((!empty($conf->ldap->enabled) && getDolGlobalString('LDAP_CONTACT_ACTIVE'))
|
||||
if ((isModEnabled('ldap') && getDolGlobalString('LDAP_CONTACT_ACTIVE'))
|
||||
&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
|
||||
$langs->load("ldap");
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ function member_prepare_head(Adherent $object)
|
||||
$head[$h][2] = 'general';
|
||||
$h++;
|
||||
|
||||
if ((!empty($conf->ldap->enabled) && getDolGlobalString('LDAP_MEMBER_ACTIVE'))
|
||||
if ((isModEnabled('ldap') && getDolGlobalString('LDAP_MEMBER_ACTIVE'))
|
||||
&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
|
||||
$langs->load("ldap");
|
||||
|
||||
@@ -193,7 +193,7 @@ function member_type_prepare_head(AdherentType $object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if ((!empty($conf->ldap->enabled) && getDolGlobalString('LDAP_MEMBER_TYPE_ACTIVE'))
|
||||
if ((isModEnabled('ldap') && getDolGlobalString('LDAP_MEMBER_TYPE_ACTIVE'))
|
||||
&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
|
||||
$langs->load("ldap");
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function user_prepare_head(User $object)
|
||||
$head[$h][2] = 'user';
|
||||
$h++;
|
||||
|
||||
if ((!empty($conf->ldap->enabled) && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
|
||||
if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
|
||||
&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
|
||||
$langs->load("ldap");
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/ldap.php?id='.$object->id;
|
||||
@@ -254,7 +254,7 @@ function group_prepare_head($object)
|
||||
$head[$h][2] = 'group';
|
||||
$h++;
|
||||
|
||||
if ((!empty($conf->ldap->enabled) && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
|
||||
if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
|
||||
&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
|
||||
$langs->load("ldap");
|
||||
$head[$h][0] = DOL_URL_ROOT.'/user/group/ldap.php?id='.$object->id;
|
||||
|
||||
@@ -167,7 +167,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
||||
// Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
|
||||
|
||||
// ldap2dolibarr synchronisation
|
||||
if ($login && !empty($conf->ldap->enabled) && getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_LDAP_TO_DOLIBARR) { // ldap2dolibarr synchronization
|
||||
if ($login && isModEnabled('ldap') && getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_LDAP_TO_DOLIBARR) { // ldap2dolibarr synchronization
|
||||
dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr");
|
||||
|
||||
// On charge les attributes du user ldap
|
||||
|
||||
Reference in New Issue
Block a user