';
@@ -400,8 +402,10 @@ foreach ($configfileparameters as $key => $value) {
if (in_array($newkey, array('dolibarr_main_db_pass', 'dolibarr_main_auth_ldap_admin_pass'))) {
if (empty($dolibarr_main_prod)) {
print '';
+ print showValueWithClipboardCPButton(${$newkey}, 0, '********');
+ } else {
+ print '**********';
}
- print '**********';
} elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) {
print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
} elseif ($newkey == 'dolibarr_main_document_root_alt') {
@@ -420,9 +424,14 @@ foreach ($configfileparameters as $key => $value) {
}
} elseif ($newkey == 'dolibarr_main_instance_unique_id') {
//print $conf->file->instance_unique_id;
- global $dolibarr_main_cookie_cryptkey;
- $valuetoshow = ${$newkey} ? ${$newkey} : $dolibarr_main_cookie_cryptkey; // Use $dolibarr_main_instance_unique_id first then $dolibarr_main_cookie_cryptkey
- print $valuetoshow;
+ global $dolibarr_main_cookie_cryptkey, $dolibarr_main_instance_unique_id;
+ $valuetoshow = $dolibarr_main_instance_unique_id ? $dolibarr_main_instance_unique_id : $dolibarr_main_cookie_cryptkey; // Use $dolibarr_main_instance_unique_id first then $dolibarr_main_cookie_cryptkey
+ if (empty($dolibarr_main_prod)) {
+ print '';
+ print showValueWithClipboardCPButton($valuetoshow, 0, '********');
+ } else {
+ print '**********';
+ }
if (empty($valuetoshow)) {
print img_warning("EditConfigFileToAddEntry", 'dolibarr_main_instance_unique_id');
}
@@ -441,6 +450,13 @@ foreach ($configfileparameters as $key => $value) {
if (!empty($valuetoshow)) {
print img_warning($langs->trans('SwitchThisForABetterSecurity', 0));
}
+ } elseif ($newkey == 'dolibarr_main_db_readonly') {
+ print ${$newkey};
+
+ $valuetoshow = ${$newkey};
+ if (!empty($valuetoshow)) {
+ print img_warning($langs->trans('ReadOnlyMode', 1));
+ }
} else {
print (empty(${$newkey}) ? '' : ${$newkey});
}
diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php
index 0b2f2678521..032a23a68c8 100644
--- a/htdocs/admin/system/security.php
+++ b/htdocs/admin/system/security.php
@@ -251,7 +251,7 @@ print '
';
if (empty($conf->global->SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF)) {
print '
: ';
if (!empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass)) {
- print img_picto('', 'warning').' '.$langs->trans("DatabasePasswordNotObfuscated").'
';
+ print img_picto('', 'warning').' '.$langs->trans("DatabasePasswordNotObfuscated").'
';
} else {
print img_picto('', 'tick').' '.$langs->trans("DatabasePasswordObfuscated");
@@ -267,49 +267,14 @@ if (empty($conf->global->SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF)) {
print '
';
-print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup").' + '.$langs->trans("OtherSetup"), '', 'folder');
-//print '
' : $conf->global->MAIN_SECURITY_HASH_ALGO)." ";
-if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
- print '
';
-}
-if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
- print '
';
-}
-if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
- print '
The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.
';
- print 'If you really want to switch, you must:
';
- print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'
';
- print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password
';
- print '- You can now logout and login with this new password. You must now reset password of all other users.
';
- print '
';
-}
+print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup"), '', 'folder');
+
+
+print '
: ';
+print empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) ? '' : img_picto('', 'tick').' ';
+print yn(empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) ? 0 : 1);
print '
';
-} else {
- print $conf->global->MAIN_EXEC_USE_POPEN;
-}
-if ($execmethod == 1) {
- print '
';
+
+
+print load_fiche_titre($langs->trans("OtherSetup").' ('.$langs->trans("Experimental").')', '', 'folder');
+
+
+//print '
' : $conf->global->MAIN_SECURITY_HASH_ALGO)." ";
+if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) {
+ print '
';
+}
+if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
+ print '
';
+}
+if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') {
+ print '
The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.
';
+ print 'If you really want to switch, you must:
';
+ print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'
';
+ print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password
';
+ print '- You can now logout and login with this new password. You must now reset password of all other users.
';
+ print '
';
+} else {
+ print $conf->global->MAIN_EXEC_USE_POPEN;
+}
+if ($execmethod == 1) {
+ print '
';
+
// Modules/Applications
@@ -405,7 +426,7 @@ if (empty($conf->api->enabled) && empty($conf->webservices->enabled)) {
print '
';
}
}
diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php
index 752591ade9e..16af18d8277 100644
--- a/htdocs/asset/note.php
+++ b/htdocs/asset/note.php
@@ -70,8 +70,13 @@ $permissionnote = 1;
* Actions
*/
-include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
-
+$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) {
+ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+}
+if (empty($reshook)) {
+ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
+}
/*
* View
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index b598b95ae0a..cd530994b9b 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -532,10 +532,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
if (!empty($object->table_element_line)) {
- print '