File tree Expand file tree Collapse file tree
app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414use Magento \Framework \App \Request \DataPersistorInterface ;
1515
1616/**
17+ * Save action for catalog rule
18+ *
1719 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820 */
1921class Save extends \Magento \CatalogRule \Controller \Adminhtml \Promo \Catalog implements HttpPostActionInterface
@@ -40,7 +42,9 @@ public function __construct(
4042 }
4143
4244 /**
43- * @return void
45+ * Execute save action from catalog rule
46+ *
47+ * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void
4448 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
4549 */
4650 public function execute ()
@@ -61,6 +65,17 @@ public function execute()
6165 ['request ' => $ this ->getRequest ()]
6266 );
6367 $ 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 ();
6479 $ id = $ this ->getRequest ()->getParam ('rule_id ' );
6580 if ($ id ) {
6681 $ model = $ ruleRepository ->get ($ id );
You can’t perform that action at this time.
0 commit comments