This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +5
-9
lines changed
Backend/Ui/Component/Control
CatalogImportExport/Model/Import
Controller/Adminhtml/Import Expand file tree Collapse file tree 5 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class DeleteButton implements ButtonProviderInterface
58
58
/**
59
59
* @param RequestInterface $request
60
60
* @param UrlInterface $urlBuilder
61
+ * @param Escaper $escaper
61
62
* @param string $confirmationMessage
62
63
* @param string $idFieldName
63
64
* @param string $deleteRoutePath
@@ -87,7 +88,7 @@ public function __construct(
87
88
public function getButtonData ()
88
89
{
89
90
$ data = [];
90
- $ fieldId = $ this ->request ->getParam ($ this ->idFieldName );
91
+ $ fieldId = $ this ->escaper -> escapeJs ( $ this -> escaper -> escapeHtml ( $ this -> request ->getParam ($ this ->idFieldName )) );
91
92
if (null !== $ fieldId ) {
92
93
$ url = $ this ->urlBuilder ->getUrl ($ this ->deleteRoutePath );
93
94
$ escapedMessage = $ this ->escaper ->escapeJs ($ this ->escaper ->escapeHtml ($ this ->confirmationMessage ));
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
536
536
537
537
/**
538
538
* @var \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory
539
- * @deprecated
539
+ * @deprecated this variable isn't used anymore.
540
540
*/
541
541
protected $ _stockResItemFac ;
542
542
Original file line number Diff line number Diff line change @@ -81,15 +81,13 @@ public function execute()
81
81
$ entityName = $ this ->getRequest ()->getParam ('filename ' );
82
82
83
83
if (preg_match ('/^\w+$/ ' , $ entityName ) == 0 ) {
84
- /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
85
- $ this ->messageManager ->addErrorMessage (__ ('Incorrect file name. ' ));
84
+ $ this ->messageManager ->addErrorMessage (__ ('Incorrect entity name. ' ));
86
85
87
86
return $ this ->getResultRedirect ();
88
87
}
89
88
try {
90
89
$ fileContents = $ this ->sampleFileProvider ->getFileContents ($ entityName );
91
90
} catch (NoSuchEntityException $ e ) {
92
- /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
93
91
$ this ->messageManager ->addError (__ ('There is no sample file for this entity. ' ));
94
92
95
93
return $ this ->getResultRedirect ();
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ public function getFileContents(string $entityName): string
85
85
*/
86
86
private function getPath (string $ entityName ): string
87
87
{
88
- $ directoryRead = $ this ->getDirectoryRead ($ entityName );
89
88
$ moduleName = $ this ->getModuleName ($ entityName );
89
+ $ directoryRead = $ this ->getDirectoryRead ($ entityName );
90
90
$ moduleDir = $ this ->componentRegistrar ->getPath (ComponentRegistrar::MODULE , $ moduleName );
91
91
$ fileAbsolutePath = $ moduleDir . '/Files/Sample/ ' . $ entityName . '.csv ' ;
92
92
Original file line number Diff line number Diff line change 21
21
<!-- <exclude>testsuite/Magento/GraphQl</exclude> -->
22
22
<directory suffix =" Test.php" >../../../app/code/*/*/Test/Api</directory >
23
23
</testsuite >
24
- <testsuite name =" msi" >
25
- <directory suffix =" Test.php" >../../../app/code/*/*/Test/Api</directory >
26
- </testsuite >
27
24
</testsuites >
28
25
29
26
<!-- PHP INI settings and constants definition -->
You can’t perform that action at this time.
0 commit comments