|
14 | 14 | use Magento\Catalog\Model\Product\Gallery\MimeTypeExtensionMap; |
15 | 15 | use Magento\Catalog\Model\ProductRepository\MediaGalleryProcessor; |
16 | 16 | use Magento\Catalog\Model\ResourceModel\Product\Collection; |
17 | | -use Magento\CatalogUrlRewrite\Block\UrlKeyRenderer; |
18 | 17 | use Magento\Eav\Model\Entity\Attribute\Exception as AttributeException; |
19 | 18 | use Magento\Framework\Api\Data\ImageContentInterfaceFactory; |
20 | 19 | use Magento\Framework\Api\ImageContentValidatorInterface; |
|
34 | 33 | use Magento\Framework\Exception\TemporaryState\CouldNotSaveException as TemporaryCouldNotSaveException; |
35 | 34 | use Magento\Framework\Exception\ValidatorException; |
36 | 35 | use Magento\Framework\ObjectManager\ResetAfterRequestInterface; |
37 | | -use Magento\Store\Model\ScopeInterface; |
38 | 36 | use Magento\Store\Model\Store; |
39 | 37 | use Magento\Catalog\Api\Data\EavAttributeInterface; |
40 | 38 |
|
@@ -190,11 +188,6 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa |
190 | 188 | */ |
191 | 189 | private $scopeOverriddenValue; |
192 | 190 |
|
193 | | - /** |
194 | | - * @var ScopeConfigInterface |
195 | | - */ |
196 | | - private ScopeConfigInterface $scopeConfig; |
197 | | - |
198 | 191 | /** |
199 | 192 | * ProductRepository constructor. |
200 | 193 | * @param ProductFactory $productFactory |
@@ -251,8 +244,7 @@ public function __construct( |
251 | 244 | $cacheLimit = 1000, |
252 | 245 | ?ReadExtensions $readExtensions = null, |
253 | 246 | ?CategoryLinkManagementInterface $linkManagement = null, |
254 | | - ?ScopeOverriddenValue $scopeOverriddenValue = null, |
255 | | - ?ScopeConfigInterface $scopeConfig = null |
| 247 | + ?ScopeOverriddenValue $scopeOverriddenValue = null |
256 | 248 | ) { |
257 | 249 | $this->productFactory = $productFactory; |
258 | 250 | $this->collectionFactory = $collectionFactory; |
@@ -280,8 +272,6 @@ public function __construct( |
280 | 272 | ->get(CategoryLinkManagementInterface::class); |
281 | 273 | $this->scopeOverriddenValue = $scopeOverriddenValue ?: \Magento\Framework\App\ObjectManager::getInstance() |
282 | 274 | ->get(ScopeOverriddenValue::class); |
283 | | - $this->scopeConfig = $scopeConfig ?: \Magento\Framework\App\ObjectManager::getInstance() |
284 | | - ->get(ScopeConfigInterface::class); |
285 | 275 | } |
286 | 276 |
|
287 | 277 | /** |
@@ -661,14 +651,6 @@ public function save(ProductInterface $product, $saveOptions = false) |
661 | 651 | } |
662 | 652 | } |
663 | 653 |
|
664 | | - $isSaveHistory = $this->scopeConfig->isSetFlag( |
665 | | - UrlKeyRenderer::XML_PATH_SEO_SAVE_HISTORY, |
666 | | - ScopeInterface::SCOPE_STORE, |
667 | | - $productDataArray['store_id'] |
668 | | - ); |
669 | | - |
670 | | - $product->setData('save_rewrites_history', $isSaveHistory); |
671 | | - |
672 | 654 | $this->saveProduct($product); |
673 | 655 | if ($assignToCategories === true && $product->getCategoryIds()) { |
674 | 656 | $this->linkManagement->assignProductToCategories( |
|
0 commit comments