Commit d559dba7 authored by Nigel McNie's avatar Nigel McNie
Browse files

If a block config has the 'artefactid' field set to null, don't export the field.



Previously, they were being exported as portfolio:artefactnull, which is
hardly desirable.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent f990fc6f
......@@ -253,8 +253,14 @@ class PluginExportLeap extends PluginExport {
foreach ($config['columns'] as &$column) {
foreach ($column as &$blockinstance) {
if (isset($blockinstance['config']['artefactid'])) {
// json_encoded value of null is the string 'null', don't include these
if ($blockinstance['config']['artefactid'] != 'null') {
$blockinstance['config']['artefactid'] = 'portfolio:artefact' . $blockinstance['config']['artefactid'];
}
else {
$blockinstance['config']['artefactid'] = null;
}
}
else if (isset($blockinstance['config']['artefactids'])) {
$ids = json_decode($blockinstance['config']['artefactids']);
$blockinstance['config']['artefactids'] = json_encode(array_map(array($this, 'prepend_artefact_identifier'), $ids));
......
Supports Markdown
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