Skip to content

Commit

Permalink
block type sets import work
Browse files Browse the repository at this point in the history
  • Loading branch information
aembler committed Jan 30, 2015
1 parent 62f3830 commit 62536f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/concrete/src/Backup/ContentImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,10 @@ protected function importBlockTypeSets(\SimpleXMLElement $sx)
if (isset($sx->blocktypesets)) {
foreach ($sx->blocktypesets->blocktypeset as $bts) {
$pkg = static::getPackageObject($bts['package']);
$set = BlockTypeSet::add((string)$bts['handle'], (string)$bts['name'], $pkg);
$set = BlockTypeSet::getByHandle((string) $bts['handle']);
if (!is_object($set)) {
$set = BlockTypeSet::add((string)$bts['handle'], (string)$bts['name'], $pkg);
}
foreach ($bts->children() as $btk) {
$bt = BlockType::getByHandle((string)$btk['handle']);
if (is_object($bt)) {
Expand Down

0 comments on commit 62536f0

Please sign in to comment.