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,7 +253,13 @@ class PluginExportLeap extends PluginExport { ...@@ -253,7 +253,13 @@ class PluginExportLeap extends PluginExport {
foreach ($config['columns'] as &$column) { foreach ($config['columns'] as &$column) {
foreach ($column as &$blockinstance) { foreach ($column as &$blockinstance) {
if (isset($blockinstance['config']['artefactid'])) { if (isset($blockinstance['config']['artefactid'])) {
$blockinstance['config']['artefactid'] = 'portfolio:artefact' . $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'])) { else if (isset($blockinstance['config']['artefactids'])) {
$ids = json_decode($blockinstance['config']['artefactids']); $ids = json_decode($blockinstance['config']['artefactids']);
......
Markdown is supported
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