Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	.github/workflows/pre-commit.yml
	ChangeLog
	dev/tools/codespell/codespell-lines-ignore.txt
	htdocs/comm/mailing/card.php
	htdocs/contact/card.php
	htdocs/langs/en_US/admin.lang
	htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
This commit is contained in:
Laurent Destailleur
2024-02-07 18:30:10 +01:00
48 changed files with 242 additions and 228 deletions

View File

@@ -502,7 +502,7 @@ class MyObject extends CommonObject
if (strpos($value, '%') === false) {
$sqlwhere[] = $key . " = '" . $this->db->sanitize($this->db->escape($value)) . "'";
} else {
$sqlwhere[] = $key . " LIKE '%" . $this->db->escapeforlike($this->db->escape($value)) . "%'";
$sqlwhere[] = $key . " LIKE '%" . $this->db->escape($this->db->escapeforlike($value)) . "%'";
}
}
}
@@ -617,8 +617,8 @@ class MyObject extends CommonObject
return 0;
}
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->myobject->myobject_advance->validate))))
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule', 'myobject', 'write'))
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule', 'myobject_advance', 'validate')))
{
$this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);