Commit 213aeb0b authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1798209: ignore not portfolio pages when importing Leap2A"

parents 2cdddabc 92d0b92e
......@@ -1162,7 +1162,7 @@ class PluginImportLeap extends PluginImport {
$view['id'] = $ierview->id;
$view['decision'] = $ierview->decision;
$view['disabled'][PluginImport::DECISION_IGNORE] = false;
$view['disabled'][PluginImport::DECISION_ADDNEW] = false;
$view['disabled'][PluginImport::DECISION_ADDNEW] = in_array($view['type'], array('dashboard', 'profile'));
$view['disabled'][PluginImport::DECISION_APPEND] = true;
$view['disabled'][PluginImport::DECISION_REPLACE] = true;
$entryviews[] = $view;
......
......@@ -242,7 +242,12 @@ abstract class PluginImport extends Plugin implements IPluginImport {
$title = $entrydata['content']['title'];
if ($plugin === 'core') {
// For view import
$decision = PluginImport::DECISION_ADDNEW;
if (isset($entrydata['content']['type']) && in_array($entrydata['content']['type'], array('dashboard', 'profile'))) {
$decision = PluginImport::DECISION_IGNORE;
}
else {
$decision = PluginImport::DECISION_ADDNEW;
}
}
else {
safe_require('artefact', $plugin);
......
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