diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 13358074514..dc0400577f3 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -778,12 +778,16 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
do {
$oldstringtoclean = $out;
+ // Ckeditor use the numeric entitic for apostrophe so we force it to text entity (all other special chars are correctly
+ // encoded using text entities). This is a fix for CKeditor (CKeditor still encode in HTML4 instead of HTML5).
+ $out = preg_replace('/'/i', ''', $out);
+
// We replace chars from a/A to z/Z encoded with numeric HTML entities with the real char so we won't loose the chars at the next step.
// No need to use a loop here, this step is not to sanitize (this is done at next step, this is to try to save chars, even if they are
// using a non coventionnel way to be encoded, to not have them sanitized just after)
$out = preg_replace_callback('/(x?[0-9][0-9a-f]+;?)/i', 'realCharForNumericEntities', $out);
- // Now we remove all remaining HTML entities staring with a number. We don't want such entities.
+ // Now we remove all remaining HTML entities starting with a number. We don't want such entities.
$out = preg_replace('/?[0-9]+/i', '', $out); // For example if we have javascript with an entities without the ; to hide the 'a' of 'javascript'.
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php
index 9de95be506b..0f3927709eb 100644
--- a/htdocs/core/login/functions_ldap.php
+++ b/htdocs/core/login/functions_ldap.php
@@ -29,7 +29,7 @@
*
* @param string $usertotest Login
* @param string $passwordtotest Password
- * @param int $entitytotest Number of instance (always 1 if module multicompany not enabled)
+ * @param int $entitytotest Numero of instance (always 1 if module multicompany not enabled)
* @return string Login if OK, '' if KO
*/
function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
@@ -151,10 +151,13 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
if ($result > 0) {
if ($result == 2) { // Connection is ok for user/pass into LDAP
$login = $usertotest;
- if (!empty($conf->global->LDAP_FIELD_LOGIN)) {
- $login = $ldap->login;
- }
dol_syslog("functions_ldap::check_user_password_ldap $login authentication ok");
+ // For the case, we search the user id using a search key without the login (but using other fields like id),
+ // we need to get the real login to use in the ldap answer.
+ if (!empty($conf->global->LDAP_FIELD_LOGIN) && !empty($ldap->login)) {
+ $login = $ldap->login;
+ dol_syslog("functions_ldap::check_user_password_ldap login is now $login (LDAP_FIELD_LOGIN=".$conf->global->LDAP_FIELD_LOGIN.")");
+ }
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@@ -207,7 +210,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
}
$usertmp = new User($db);
- $resultFetchUser = $usertmp->fetch('', $login, $sid);
+ $resultFetchUser = $usertmp->fetch('', $login, $sid, 1, ($entitytotest > 0 ? $entitytotest : -1));
if ($resultFetchUser > 0) {
dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id);
// On verifie si le login a change et on met a jour les attributs dolibarr
@@ -215,7 +218,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
if ($usertmp->login != $ldap->login && $ldap->login) {
$usertmp->login = $ldap->login;
$usertmp->update($usertmp);
- // TODO Que faire si update echoue car on update avec un login deja existant.
+ // TODO Que faire si update echoue car on update avec un login deja existant pour un autre compte.
}
//$resultUpdate = $usertmp->update_ldap2dolibarr($ldap);
@@ -231,7 +234,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
$usertmp->fetch('', $login);
$ret = $mc->checkRight($usertmp->id, $entitytotest);
if ($ret < 0) {
- dol_syslog("functions_ldap::check_user_password_ldap Authentication KO entity '".$entitytotest."' not allowed for user '".$usertmp->id."'", LOG_NOTICE);
+ dol_syslog("functions_ldap::check_user_password_ldap Authentication KO entity '".$entitytotest."' not allowed for user id '".$usertmp->id."'", LOG_NOTICE);
$login = ''; // force authentication failure
}
unset($usertmp);
diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql
index 9012f6b3a66..2f3f7660698 100644
--- a/htdocs/install/mysql/tables/llx_actioncomm.sql
+++ b/htdocs/install/mysql/tables/llx_actioncomm.sql
@@ -55,7 +55,7 @@ create table llx_actioncomm
durationp real, -- planed duration
label varchar(255) NOT NULL, -- label/title of event or topic of email
- note text, -- note of event or content of email
+ note text, -- private note of event or content of email
calling_duration integer, -- when event is a phone call, duration of phone call
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 6733f8ab69e..53e67eba2cb 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -53,6 +53,7 @@ InternalUser=Internal user
ExternalUser=External user
InternalUsers=Internal users
ExternalUsers=External users
+UserInterface=User interface
GUISetup=Display
SetupArea=Setup
UploadNewTemplate=Upload new template(s)
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index b23cfbc5c4c..5a83c685e0f 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -507,14 +507,16 @@ print "
";
print "
";
-print load_fiche_titre($langs->trans("ProductOtherConf"), '', '');
-
print '