File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \Framework \App \Request \DataPersistorInterface ;
15
15
16
16
/**
17
+ * Save action for catalog rule
18
+ *
17
19
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18
20
*/
19
21
class Save extends \Magento \CatalogRule \Controller \Adminhtml \Promo \Catalog implements HttpPostActionInterface
@@ -40,7 +42,9 @@ public function __construct(
40
42
}
41
43
42
44
/**
43
- * @return void
45
+ * Execute save action from catalog rule
46
+ *
47
+ * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
44
48
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
45
49
*/
46
50
public function execute ()
@@ -61,6 +65,17 @@ public function execute()
61
65
['request ' => $ this ->getRequest ()]
62
66
);
63
67
$ data = $ this ->getRequest ()->getPostValue ();
68
+
69
+ $ filterValues = ['from_date ' => $ this ->_dateFilter ];
70
+ if ($ this ->getRequest ()->getParam ('to_date ' )) {
71
+ $ filterValues ['to_date ' ] = $ this ->_dateFilter ;
72
+ }
73
+ $ inputFilter = new \Zend_Filter_Input (
74
+ $ filterValues ,
75
+ [],
76
+ $ data
77
+ );
78
+ $ data = $ inputFilter ->getUnescaped ();
64
79
$ id = $ this ->getRequest ()->getParam ('rule_id ' );
65
80
if ($ id ) {
66
81
$ model = $ ruleRepository ->get ($ id );
You can’t perform that action at this time.
0 commit comments