Skip to content
Snippets Groups Projects
Commit da0f7aae authored by Laurent's avatar Laurent
Browse files

hotline #28796 fix duplicate entries for dynamic facets when label size is more than 20 characters

parent 5ea51926
Branches
Tags
No related merge requests found
......@@ -213,7 +213,7 @@ class KohaRecordIntegrationVagabondWithThesaurusOn702DollarATest extends KohaRec
['id' => 5,
'libelle' => 'd\'après l\'oeuvre d\'Eiji Yoshikawa, "Miyamoto Musashi"',
'id_thesaurus' => 'SUMM0001',
'id_origine' => 'D\'APRèS L\'OEUVRE D\'',
'id_origine' => 'D\'APRèS L\'OEUVRE D\'E',
'code' => 'summary'
]);
......
......@@ -243,8 +243,9 @@ class Class_CodifThesaurus extends Storm_Model_Abstract {
public function getOrCreateChild($id_origine, $label) {
if (!$entry = $this->getLoader()->findFirstBy(['code' => $this->getCode(),
'id_origine' => substr($id_origine, 0, self::COLUMN_ORIGIN_SIZE)])) {
if (!$entry = $this->getLoader()
->findFirstBy(['code' => $this->getCode(),
'id_origine' => mb_substr($id_origine, 0, self::COLUMN_ORIGIN_SIZE, 'UTF-8')])) {
$entry = $this
->newChildEntry()
->updateAttributes(['id_origine' => $id_origine,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment