Skip to content
Snippets Groups Projects
Commit 3a53f168 authored by Paal Joergensen's avatar Paal Joergensen
Browse files

HFP-2184 Permit change of main content title in content upgrade

parent bfd310ee
No related branches found
No related tags found
No related merge requests found
......@@ -921,7 +921,7 @@ class framework implements \H5PFrameworkInterface {
$content['disable'] = \H5PCore::DISABLE_NONE;
}
$data = array_merge(\H5PMetadata::toDBArray($metadata), array(
$data = array_merge(\H5PMetadata::toDBArray($metadata, false), array(
'name' => isset($metadata['title']) ? $metadata['title'] : $content['name'],
'course' => $content['course'],
'intro' => $content['intro'],
......
......@@ -337,7 +337,7 @@ function hvp_content_upgrade_progress($libraryid) {
// Update extras.
$extras = json_decode($extras);
if (isset($extras->metadata)) {
$fields = \H5PMetadata::toDBArray($extras->metadata);
$fields = \H5PMetadata::toDBArray($extras->metadata, false);
$fields['id'] = $id;
$fields['name'] = $fields['title'];
unset($fields['title']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment