Skip to content

Commit

Permalink
fix: findOrGetInstance to apply cache!
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Oct 24, 2023
1 parent 1f97924 commit 5c314a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/Config/PluginConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public static function importFromXML(string $xml_file_path): void
if (!$parent_usage_id) {
continue;
}
$xoctPublicationSubUsage = new PublicationSubUsage();
$xoctPublicationSubUsage = PublicationSubUsage::findOrGetInstance(0);
$xoctPublicationSubUsage->setParentUsageId($node->getElementsByTagName('parent_usage_id')->item(0)->nodeValue);
$xoctPublicationSubUsage->setTitle($node->getElementsByTagName('title')->item(0)->nodeValue);
$xoctPublicationSubUsage->setDescription($node->getElementsByTagName('description')->item(0)->nodeValue);
Expand Down Expand Up @@ -293,7 +293,7 @@ public static function importFromXML(string $xml_file_path): void

foreach ($xoct_publication_usage_groups as $node) {
$old_id = $node->getElementsByTagName('id')->item(0)->nodeValue;
$xoctPublicationUsageGroup = new PublicationUsageGroup();
$xoctPublicationUsageGroup = PublicationUsageGroup::findOrGetInstance(0);
$xoctPublicationUsageGroup->setName($node->getElementsByTagName('name')->item(0)->nodeValue);
$xoctPublicationUsageGroup->setDisplayName($node->getElementsByTagName('display_name')->item(0)->nodeValue);
$xoctPublicationUsageGroup->setDescription($node->getElementsByTagName('description')->item(0)->nodeValue);
Expand Down

0 comments on commit 5c314a7

Please sign in to comment.