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 ...@@ -213,7 +213,7 @@ class KohaRecordIntegrationVagabondWithThesaurusOn702DollarATest extends KohaRec
['id' => 5, ['id' => 5,
'libelle' => 'd\'après l\'oeuvre d\'Eiji Yoshikawa, "Miyamoto Musashi"', 'libelle' => 'd\'après l\'oeuvre d\'Eiji Yoshikawa, "Miyamoto Musashi"',
'id_thesaurus' => 'SUMM0001', 'id_thesaurus' => 'SUMM0001',
'id_origine' => 'D\'APRèS L\'OEUVRE D\'', 'id_origine' => 'D\'APRèS L\'OEUVRE D\'E',
'code' => 'summary' 'code' => 'summary'
]); ]);
......
...@@ -243,8 +243,9 @@ class Class_CodifThesaurus extends Storm_Model_Abstract { ...@@ -243,8 +243,9 @@ class Class_CodifThesaurus extends Storm_Model_Abstract {
public function getOrCreateChild($id_origine, $label) { public function getOrCreateChild($id_origine, $label) {
if (!$entry = $this->getLoader()->findFirstBy(['code' => $this->getCode(), if (!$entry = $this->getLoader()
'id_origine' => substr($id_origine, 0, self::COLUMN_ORIGIN_SIZE)])) { ->findFirstBy(['code' => $this->getCode(),
'id_origine' => mb_substr($id_origine, 0, self::COLUMN_ORIGIN_SIZE, 'UTF-8')])) {
$entry = $this $entry = $this
->newChildEntry() ->newChildEntry()
->updateAttributes(['id_origine' => $id_origine, ->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