Merge pull request #21861 from grandoc/new_branch_24_08_2022
FIX php8 compatibility
This commit is contained in:
commit
c3f5b4b524
@ -190,7 +190,7 @@ print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '
|
|||||||
print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
|
print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
|
||||||
if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
if (isModEnabled('multicompany') && !$user->entity) {
|
||||||
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
|
print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
|
||||||
}
|
}
|
||||||
print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
@ -212,7 +212,7 @@ print '</td>';
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Limit to superadmin
|
// Limit to superadmin
|
||||||
if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
if (isModEnabled('multicompany') && !$user->entity) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="entity" value="' . $conf->entity . '">';
|
print '<input type="text" class="flat" size="1" name="entity" value="' . $conf->entity . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -281,7 +281,7 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Entity limit to superadmin
|
// Entity limit to superadmin
|
||||||
if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
if (isModEnabled('multicompany') && !$user->entity) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.((int) $obj->entity).'">';
|
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.((int) $obj->entity).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -185,7 +185,7 @@ $message .= ajax_autoselect('webdavpublicurl');
|
|||||||
|
|
||||||
$message .= '<br>';
|
$message .= '<br>';
|
||||||
if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
|
if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
|
||||||
$urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : '');
|
$urlEntity = (isModEnabled('multicompany') ? '?entity=' . $conf->entity : '');
|
||||||
$url = '<a href="' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '" target="_blank" rel="noopener noreferrer">' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '</a>';
|
$url = '<a href="' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '" target="_blank" rel="noopener noreferrer">' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '</a>';
|
||||||
|
|
||||||
$message .= img_picto('', 'globe') . ' ' . str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', ''));
|
$message .= img_picto('', 'globe') . ' ' . str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', ''));
|
||||||
|
|||||||
@ -306,7 +306,7 @@ if ($mode != 'focus' && $mode != 'mandatory') {
|
|||||||
print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
// Entity
|
// Entity
|
||||||
if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
if (isModEnabled('multicompany') && !$user->entity) {
|
||||||
print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,page', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,page', '', $param, '', $sortfield, $sortorder);
|
||||||
} else {
|
} else {
|
||||||
print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
@ -335,7 +335,7 @@ if ($mode != 'focus' && $mode != 'mandatory') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Limit to superadmin
|
// Limit to superadmin
|
||||||
if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
if (isModEnabled('multicompany') && !$user->entity) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="1" disabled name="entity" value="' . $conf->entity . '">'; // We see environment, but to change it we must switch on other entity
|
print '<input type="text" class="flat" size="1" disabled name="entity" value="' . $conf->entity . '">'; // We see environment, but to change it we must switch on other entity
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -172,7 +172,7 @@ if (!isset($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS)) {
|
|||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
foreach ($modules as $module => $delays) {
|
foreach ($modules as $module => $delays) {
|
||||||
if (!empty($conf->$module->enabled)) {
|
if (isModEnabled('module')) {
|
||||||
foreach ($delays as $delay) {
|
foreach ($delays as $delay) {
|
||||||
if (GETPOST($delay['code']) != '') {
|
if (GETPOST($delay['code']) != '') {
|
||||||
dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity);
|
||||||
@ -226,7 +226,7 @@ if ($action == 'edit') {
|
|||||||
print '<td class="right">'.$langs->trans("LateWarningAfter").'</td></tr>';
|
print '<td class="right">'.$langs->trans("LateWarningAfter").'</td></tr>';
|
||||||
|
|
||||||
foreach ($modules as $module => $delays) {
|
foreach ($modules as $module => $delays) {
|
||||||
if (!empty($conf->$module->enabled)) {
|
if (isModEnabled('module')) {
|
||||||
foreach ($delays as $delay) {
|
foreach ($delays as $delay) {
|
||||||
$value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
|
$value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -260,7 +260,7 @@ if ($action == 'edit') {
|
|||||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("DelaysOfToleranceBeforeWarning").'</td><td class="right">'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("DelaysOfToleranceBeforeWarning").'</td><td class="right">'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
foreach ($modules as $module => $delays) {
|
foreach ($modules as $module => $delays) {
|
||||||
if (!empty($conf->$module->enabled)) {
|
if (isModEnabled('module')) {
|
||||||
foreach ($delays as $delay) {
|
foreach ($delays as $delay) {
|
||||||
$value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
|
$value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']} : 0);
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -37,7 +37,7 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
|
|||||||
if (!$user->admin) {
|
if (!$user->admin) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (empty($conf->emailcollector->enabled)) {
|
if (!isModEnabled('emailcollector')) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,17 +550,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
'loadthirdparty' => $langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
'loadthirdparty' => $langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
|
||||||
'loadandcreatethirdparty' => $langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
'loadandcreatethirdparty' => $langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")),
|
||||||
'recordjoinpiece' => 'AttachJoinedDocumentsToObject',
|
'recordjoinpiece' => 'AttachJoinedDocumentsToObject',
|
||||||
'recordevent'=>'RecordEvent');
|
'recordevent' => 'RecordEvent'
|
||||||
|
);
|
||||||
$arrayoftypesnocondition = $arrayoftypes;
|
$arrayoftypesnocondition = $arrayoftypes;
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
$arrayoftypes['project'] = 'CreateLeadAndThirdParty';
|
||||||
}
|
}
|
||||||
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
|
$arrayoftypesnocondition['project'] = 'CreateLeadAndThirdParty';
|
||||||
if (!empty($conf->ticket->enabled)) {
|
if (isModEnabled('ticket')) {
|
||||||
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
|
$arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';
|
||||||
}
|
}
|
||||||
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
|
$arrayoftypesnocondition['ticket'] = 'CreateTicketAndThirdParty';
|
||||||
if (!empty($conf->recruitment->enabled)) {
|
if (isModEnabled('recruitment')) {
|
||||||
$arrayoftypes['candidature'] = 'CreateCandidature';
|
$arrayoftypes['candidature'] = 'CreateCandidature';
|
||||||
}
|
}
|
||||||
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
|
$arrayoftypesnocondition['candidature'] = 'CreateCandidature';
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -148,7 +148,7 @@ if ($action == 'updateMask') {
|
|||||||
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
$res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
$res3 = 0;
|
$res3 = 0;
|
||||||
if (!empty($conf->project->enabled) && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
|
if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
|
||||||
$res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
|
$res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htm
|
|||||||
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
|
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
if (!empty($conf->project->enabled)) {
|
if (isModEnabled('project')) {
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans('ProjectIsRequiredOnExpenseReports');
|
print $langs->trans('ProjectIsRequiredOnExpenseReports');
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
|
|||||||
@ -499,7 +499,7 @@ if ($action == 'edit') {
|
|||||||
print '<input class="flat" name="' . $constname . '" id="' . $constname . '" value="' . $conf->global->$constname . '" type="number" step="1" min="0" max="50" >' . "\n";
|
print '<input class="flat" name="' . $constname . '" id="' . $constname . '" value="' . $conf->global->$constname . '" type="number" step="1" min="0" max="50" >' . "\n";
|
||||||
} elseif ($val['type'] == 'html') {
|
} elseif ($val['type'] == 'html') {
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
$doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
$doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
} elseif ($val['type'] == 'yesno') {
|
} elseif ($val['type'] == 'yesno') {
|
||||||
print $form->selectyesno($constname, $conf->global->{$constname}, 1);
|
print $form->selectyesno($constname, $conf->global->{$constname}, 1);
|
||||||
@ -545,7 +545,7 @@ if ($action == 'edit') {
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
|
||||||
print dolJSToSetRandomPassword($constname, 'generate_token' . $constname);
|
print dolJSToSetRandomPassword($constname, 'generate_token' . $constname);
|
||||||
} elseif ($val['type'] == 'product') {
|
} elseif ($val['type'] == 'product') {
|
||||||
if (isModEnabled("product") || isModEnabled("service")) {
|
if (isModEnabled('product') || isModEnabled('service')) {
|
||||||
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
|
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
|
||||||
$form->select_produits($selected, $constname, '', 0);
|
$form->select_produits($selected, $constname, '', 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,7 +213,7 @@ if ($action == 'edit') {
|
|||||||
print "</textarea>\n";
|
print "</textarea>\n";
|
||||||
} elseif ($val['type'] == 'html') {
|
} elseif ($val['type'] == 'html') {
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
$doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
$doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
} elseif ($val['type'] == 'yesno') {
|
} elseif ($val['type'] == 'yesno') {
|
||||||
print $form->selectyesno($constname, $conf->global->{$constname}, 1);
|
print $form->selectyesno($constname, $conf->global->{$constname}, 1);
|
||||||
|
|||||||
@ -158,21 +158,21 @@ if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && empty($conf->global->LDAP_USER
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Synchro contact active
|
// Synchro contact active
|
||||||
if (isModEnabled("societe")) {
|
if (isModEnabled('societe')) {
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
|
||||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
|
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
|
||||||
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnContactActiveExample") . '</span></td></tr>';
|
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnContactActiveExample") . '</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchro member active
|
// Synchro member active
|
||||||
if (!empty($conf->adherent->enabled)) {
|
if (isModEnabled('adherent')) {
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberActive") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberActive") . '</td><td>';
|
||||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2);
|
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2);
|
||||||
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberActiveExample") . '</span></td></tr>';
|
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberActiveExample") . '</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchro member type active
|
// Synchro member type active
|
||||||
if (!empty($conf->adherent->enabled)) {
|
if (isModEnabled('adherent')) {
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberTypeActive") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberTypeActive") . '</td><td>';
|
||||||
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2);
|
print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2);
|
||||||
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberTypeActiveExample") . '</span></td></tr>';
|
print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberTypeActiveExample") . '</span></td></tr>';
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (!$user->admin) {
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$currencycode = GETPOST('currencycode', 'alpha');
|
$currencycode = GETPOST('currencycode', 'alpha');
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
// When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default.
|
// When MULTICURRENCY_USE_LIMIT_BY_CURRENCY is on, we use always a defined currency code instead of '' even for default.
|
||||||
$currencycode = (!empty($currencycode) ? $currencycode : $conf->currency);
|
$currencycode = (!empty($currencycode) ? $currencycode : $conf->currency);
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ print load_fiche_titre($title, '', 'title_setup');
|
|||||||
|
|
||||||
$aCurrencies = array($conf->currency); // Default currency always first position
|
$aCurrencies = array($conf->currency); // Default currency always first position
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/multicurrency.lib.php';
|
||||||
|
|
||||||
$sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency";
|
$sql = "SELECT rowid, code FROM " . MAIN_DB_PREFIX . "multicurrency";
|
||||||
@ -132,7 +132,7 @@ if ($action == 'edit') {
|
|||||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
print '<input type="hidden" name="currencycode" value="' . $currencycode . '">';
|
print '<input type="hidden" name="currencycode" value="' . $currencycode . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ if ($action == 'edit') {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
if (isModEnabled('multicompany') && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) {
|
||||||
if (!empty($aCurrencies) && count($aCurrencies) > 1) {
|
if (!empty($aCurrencies) && count($aCurrencies) > 1) {
|
||||||
print dol_get_fiche_end();
|
print dol_get_fiche_end();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ require '../main.inc.php';
|
|||||||
|
|
||||||
// Class
|
// Class
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
if (!empty($conf->accounting->enabled)) {
|
if (isModEnabled('accounting')) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ if ($action == 'update') {
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
if (!empty($conf->accounting->enabled)) {
|
if (isModEnabled('accounting')) {
|
||||||
$formaccounting = new FormAccounting($db);
|
$formaccounting = new FormAccounting($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ foreach ($list as $key) {
|
|||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!empty($conf->accounting->enabled)) {
|
if (isModEnabled('accounting')) {
|
||||||
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
|
print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">';
|
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">';
|
||||||
|
|||||||
@ -294,7 +294,7 @@ if ($action == 'edit') {
|
|||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
|
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||||
print '<input class="flat minwidth300" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" size="18" value="' . $mainserver . '">';
|
print '<input class="flat minwidth300" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" size="18" value="' . $mainserver . '">';
|
||||||
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" name="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" value="' . $mainserver . '">';
|
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" name="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" value="' . $mainserver . '">';
|
||||||
print '<span id="smtp_server_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>';
|
print '<span id="smtp_server_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>';
|
||||||
@ -326,7 +326,7 @@ if ($action == 'edit') {
|
|||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
|
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||||
print '<input class="flat" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" size="3" value="' . $mainport . '">';
|
print '<input class="flat" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" size="3" value="' . $mainport . '">';
|
||||||
print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING_sav" name="MAIN_MAIL_SMTP_PORT_EMAILING_sav" value="' . $mainport . '">';
|
print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING_sav" name="MAIN_MAIL_SMTP_PORT_EMAILING_sav" value="' . $mainport . '">';
|
||||||
print '<span id="smtp_port_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>';
|
print '<span id="smtp_port_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>';
|
||||||
@ -344,7 +344,7 @@ if ($action == 'edit') {
|
|||||||
$mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : '');
|
$mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : '');
|
||||||
print '<tr class="drag drop oddeven hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_ID") . '</td><td>';
|
print '<tr class="drag drop oddeven hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_ID") . '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
|
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||||
print '<input class="flat" name="MAIN_MAIL_SMTPS_ID_EMAILING" size="32" value="' . $mainstmpid . '">';
|
print '<input class="flat" name="MAIN_MAIL_SMTPS_ID_EMAILING" size="32" value="' . $mainstmpid . '">';
|
||||||
} else {
|
} else {
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
@ -359,7 +359,7 @@ if ($action == 'edit') {
|
|||||||
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : '');
|
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : '');
|
||||||
print '<tr class="drag drop oddeven hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_PW") . '</td><td>';
|
print '<tr class="drag drop oddeven hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_PW") . '</td><td>';
|
||||||
// SuperAdministrator access only
|
// SuperAdministrator access only
|
||||||
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
|
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||||
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW_EMAILING" size="32" value="' . $mainsmtppw . '">';
|
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW_EMAILING" size="32" value="' . $mainsmtppw . '">';
|
||||||
} else {
|
} else {
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
@ -541,7 +541,7 @@ if ($action == 'edit') {
|
|||||||
|
|
||||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=test&mode=init">' . $langs->trans("DoTestSend") . '</a>';
|
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=test&mode=init">' . $langs->trans("DoTestSend") . '</a>';
|
||||||
|
|
||||||
if (!empty($conf->fckeditor->enabled)) {
|
if (isModEnabled('fckeditor')) {
|
||||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testhtml&mode=init">' . $langs->trans("DoTestSendHTML") . '</a>';
|
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testhtml&mode=init">' . $langs->trans("DoTestSendHTML") . '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user