File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
app/code/Magento/Review/Controller/Adminhtml/Product Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 8
8
9
9
class Delete extends \Magento \Review \Controller \Adminhtml \Product
10
10
{
11
- /**
12
- * @var int
13
- */
14
- protected $ reviewId ;
15
-
16
11
/**
17
12
* @return void
18
13
*/
19
14
public function execute ()
20
15
{
21
- $ this -> reviewId = $ this ->getRequest ()->getParam ('id ' , false );
22
- $ this ->_reviewFactory ->create ()->setId ($ this -> reviewId )->aggregate ()->delete ();
16
+ $ reviewId = $ this ->getRequest ()->getParam ('id ' , false );
17
+ $ this ->_reviewFactory ->create ()->setId ($ reviewId )->aggregate ()->delete ();
23
18
24
19
$ this ->messageManager ->addSuccess (__ ('The review has been deleted. ' ));
25
20
if ($ this ->getRequest ()->getParam ('ret ' ) == 'pending ' ) {
26
21
$ this ->getResponse ()->setRedirect ($ this ->getUrl ('review/*/pending ' ));
27
22
} else {
28
23
$ this ->getResponse ()->setRedirect ($ this ->getUrl ('review/*/ ' ));
29
24
}
30
- return ;
31
25
}
32
26
33
27
/**
@@ -38,6 +32,6 @@ public function execute()
38
32
public function getDefaultRedirect ()
39
33
{
40
34
$ resultRedirect = $ this ->resultRedirectFactory ->create ();
41
- return $ resultRedirect ->setPath ('review/*/edit/ ' , ['id ' => $ this ->reviewId ]);
35
+ return $ resultRedirect ->setPath ('review/*/edit/ ' , ['id ' => $ this ->getRequest ()-> getParam ( ' id ' , false ) ]);
42
36
}
43
37
}
You can’t perform that action at this time.
0 commit comments