Fix double escaped slashes in format upgrade wizard.

In Kitodo.Presentation 2.x the `tx_dlf_formats`.`class` names have the format like `tx_dlf_alto`.

In Kitodo.Presentation 3.x the format of the namespace based classes is
like `Kitodo\Dlf\Format\Alto`.

An update wizard task is provided to convert these entries. But it adds
a double encoding of the slashes which does not work finally.

Wrong is `Kitodo\\Dlf\\Format\\Alto`.

This patch fixes this issue.
This commit is contained in:
Alexander Bigga 2021-06-28 11:16:10 +02:00
parent 01635bcac3
commit e1b4b3c098
1 changed files with 3 additions and 3 deletions

View File

@ -296,9 +296,9 @@ class ext_update
{
$oldRecords = $this->oldFormatClasses();
$newValues = [
'ALTO' => 'Kitodo\\\\Dlf\\\\Format\\\\Alto', // Those are effectively single backslashes
'MODS' => 'Kitodo\\\\Dlf\\\\Format\\\\Mods',
'TEIHDR' => 'Kitodo\\\\Dlf\\\\Format\\\\TeiHeader'
'ALTO' => 'Kitodo\\Dlf\\Format\\Alto', // Those are effectively single backslashes
'MODS' => 'Kitodo\\Dlf\\Format\\Mods',
'TEIHDR' => 'Kitodo\\Dlf\\Format\\TeiHeader'
];
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_dlf_formats');