@@ -39,13 +39,14 @@ protected function _prepareCollection()
39
39
->getResourceCollection ();
40
40
$ this ->_collection ->setRecentQueryFilter ();
41
41
42
- if ($ this ->getRequest ()->getParam ('store ' )) {
43
- $ this ->_collection ->addFieldToFilter ('store_id ' , $ this ->getRequest ()->getParam ('store ' ));
44
- } elseif ($ this ->getRequest ()->getParam ('website ' )) {
45
- $ storeIds = Mage::app ()->getWebsite ($ this ->getRequest ()->getParam ('website ' ))->getStoreIds ();
42
+ $ request = $ this ->getRequest ();
43
+ if ($ request ->getParam ('store ' )) {
44
+ $ this ->_collection ->addFieldToFilter ('store_id ' , $ request ->getParam ('store ' ));
45
+ } elseif ($ request ->getParam ('website ' )) {
46
+ $ storeIds = Mage::app ()->getWebsite ($ request ->getParam ('website ' ))->getStoreIds ();
46
47
$ this ->_collection ->addFieldToFilter ('store_id ' , ['in ' => $ storeIds ]);
47
- } elseif ($ this -> getRequest () ->getParam ('group ' )) {
48
- $ storeIds = Mage::app ()->getGroup ($ this -> getRequest () ->getParam ('group ' ))->getStoreIds ();
48
+ } elseif ($ request ->getParam ('group ' )) {
49
+ $ storeIds = Mage::app ()->getGroup ($ request ->getParam ('group ' ))->getStoreIds ();
49
50
$ this ->_collection ->addFieldToFilter ('store_id ' , ['in ' => $ storeIds ]);
50
51
}
51
52
@@ -54,6 +55,9 @@ protected function _prepareCollection()
54
55
return parent ::_prepareCollection ();
55
56
}
56
57
58
+ /**
59
+ * @throws Exception
60
+ */
57
61
protected function _prepareColumns ()
58
62
{
59
63
$ this ->addColumn ('search_query ' , [
@@ -83,6 +87,10 @@ protected function _prepareColumns()
83
87
return parent ::_prepareColumns ();
84
88
}
85
89
90
+ /**
91
+ * @param Mage_CatalogSearch_Model_Query $row
92
+ * @return string
93
+ */
86
94
public function getRowUrl ($ row )
87
95
{
88
96
return $ this ->getUrl ('*/catalog_search/edit ' , ['id ' => $ row ->getId ()]);
0 commit comments