Skip to content

Commit a81307f

Browse files
author
Andrii Kasian
committed
Merge remote-tracking branch 'origin/MAGETWO-36986' into S67
2 parents b4eb24a + 7611da7 commit a81307f

File tree

5 files changed

+5
-120
lines changed

5 files changed

+5
-120
lines changed

app/code/Magento/CatalogSearch/Model/Resource/Engine.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,25 @@ class Engine extends AbstractDb implements EngineInterface
3737
*/
3838
protected $_catalogSearchData = null;
3939

40-
/**
41-
* Catalog search data
42-
*
43-
* @var \Magento\Search\Model\Resource\Helper
44-
*/
45-
protected $_resourceHelper;
46-
4740
/**
4841
* Construct
4942
*
5043
* @param \Magento\Framework\Model\Resource\Db\Context $context
5144
* @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
5245
* @param Advanced $searchResource
5346
* @param \Magento\CatalogSearch\Helper\Data $catalogSearchData
54-
* @param \Magento\Search\Model\Resource\Helper $resourceHelper
5547
* @param string|null $resourcePrefix
5648
*/
5749
public function __construct(
5850
\Magento\Framework\Model\Resource\Db\Context $context,
5951
\Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
6052
\Magento\CatalogSearch\Model\Resource\Advanced $searchResource,
6153
\Magento\CatalogSearch\Helper\Data $catalogSearchData,
62-
\Magento\Search\Model\Resource\Helper $resourceHelper,
6354
$resourcePrefix = null
6455
) {
6556
$this->_catalogProductVisibility = $catalogProductVisibility;
6657
$this->_searchResource = $searchResource;
6758
$this->_catalogSearchData = $catalogSearchData;
68-
$this->_resourceHelper = $resourceHelper;
6959
parent::__construct($context, $resourcePrefix);
7060
}
7161

@@ -118,7 +108,7 @@ public function saveEntityIndexes($storeId, $entityIndexes, $entity = 'product')
118108
}
119109

120110
if ($data) {
121-
$this->_resourceHelper->insertOnDuplicate($this->getMainTable(), $data, ['data_index']);
111+
$this->_getWriteAdapter()->insertOnDuplicate($this->getMainTable(), $data, ['data_index']);
122112
}
123113

124114
return $this;

app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,29 @@
55
*/
66
namespace Magento\CatalogSearch\Model\Resource;
77

8-
use Magento\Search\Model\Resource\Helper;
9-
108
/**
119
* CatalogSearch Fulltext Index resource model
1210
*/
1311
class Fulltext extends \Magento\Framework\Model\Resource\Db\AbstractDb
1412
{
15-
/**
16-
* Core string
17-
*
18-
* @var \Magento\Framework\Filter\FilterManager
19-
*/
20-
protected $filter;
21-
2213
/**
2314
* Core event manager proxy
2415
*
2516
* @var \Magento\Framework\Event\ManagerInterface
2617
*/
2718
protected $_eventManager;
2819

29-
/**
30-
* CatalogSearch resource helper
31-
*
32-
* @var \Magento\Search\Model\Resource\Helper
33-
*/
34-
protected $_resourceHelper;
35-
3620
/**
3721
* @param \Magento\Framework\Model\Resource\Db\Context $context
3822
* @param \Magento\Framework\Event\ManagerInterface $eventManager
39-
* @param \Magento\Framework\Filter\FilterManager $filter
40-
* @param Helper $resourceHelper
4123
* @param string|null $resourcePrefix
4224
*/
4325
public function __construct(
4426
\Magento\Framework\Model\Resource\Db\Context $context,
4527
\Magento\Framework\Event\ManagerInterface $eventManager,
46-
\Magento\Framework\Filter\FilterManager $filter,
47-
\Magento\Search\Model\Resource\Helper $resourceHelper,
4828
$resourcePrefix = null
4929
) {
5030
$this->_eventManager = $eventManager;
51-
$this->filter = $filter;
52-
$this->_resourceHelper = $resourceHelper;
5331
parent::__construct($context, $resourcePrefix);
5432
}
5533

app/code/Magento/Search/Model/Resource/Helper.php

Lines changed: 0 additions & 84 deletions
This file was deleted.

app/code/Magento/Search/Model/Resource/Query/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac
3030
/**
3131
* Search resource helper
3232
*
33-
* @var \Magento\Search\Model\Resource\Helper
33+
* @var \Magento\Framework\DB\Helper
3434
*/
3535
protected $_resourceHelper;
3636

@@ -40,7 +40,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac
4040
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
4141
* @param \Magento\Framework\Event\ManagerInterface $eventManager
4242
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
43-
* @param \Magento\Search\Model\Resource\Helper $resourceHelper
43+
* @param \Magento\Framework\DB\Helper $resourceHelper
4444
* @param \Zend_Db_Adapter_Abstract $connection
4545
* @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
4646
*/
@@ -50,7 +50,7 @@ public function __construct(
5050
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
5151
\Magento\Framework\Event\ManagerInterface $eventManager,
5252
\Magento\Store\Model\StoreManagerInterface $storeManager,
53-
\Magento\Search\Model\Resource\Helper $resourceHelper,
53+
\Magento\Framework\DB\Helper $resourceHelper,
5454
$connection = null,
5555
\Magento\Framework\Model\Resource\Db\AbstractDb $resource = null
5656
) {

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,4 +3334,5 @@
33343334
['Magento\Log\Model\LogFactory\Clean'],
33353335
['Magento\Log\Model\Shell\CommandInterface'],
33363336
['Magento\Framework\App\Filesystem\DirectoryList\AbstractShell'],
3337+
['Magento\Search\Model\Resource\Helper'],
33373338
];

0 commit comments

Comments
 (0)