Skip to content

Commit

Permalink
Updated for Magento 1.9.2.2 security compatibility and cleaned some t…
Browse files Browse the repository at this point in the history
…hings up.
  • Loading branch information
jayelkaake committed Nov 2, 2015
1 parent 06743dc commit 502b69a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public function getRowUrl($row)

public function getGridUrl()
{
return $this->getUrl('enhancedgrid/*/grid', array(
return $this->getUrl('adminhtml/*/grid', array(
'_current' => true,
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ public function changeattributesetAction()
$productIds = $this->getRequest()->getParam('product');
$storeId = (int) $this->getRequest()->getParam('store', 0);

// todo make sure store is set... check a post data below
// $postData = Mage::app()->getRequest()->getPost();
// echo '<pre>';
// print_r($postData);
// echo '</pre>';

if (!is_array($productIds)) {
$this->_getSession()->addError($this->__('Please select product(s)'));
} else {
Expand Down
141 changes: 58 additions & 83 deletions app/code/community/TBT/Enhancedgrid/etc/config.xml
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
<?xml version="1.0"?>

<config>
<modules>
<TBT_Enhancedgrid>
<version>1.3.4</version>
</TBT_Enhancedgrid>
</modules>
<modules>
<TBT_Enhancedgrid>
<version>1.3.4.1</version>
</TBT_Enhancedgrid>
</modules>
<admin>
<routers>
<enhancedgrid>
<!-- should be set to "admin" when overloading admin stuff (?) -->
<use>admin</use>
<adminhtml>
<args>
<module>TBT_Enhancedgrid</module>
<!-- This is used when "catching" the rewrite above -->
<frontName>enhancedgrid</frontName>
<modules>
<TBT_Enhancedgrid before="Mage_Adminhtml">TBT_Enhancedgrid</TBT_Enhancedgrid>
</modules>
</args>
</enhancedgrid>
</adminhtml>
</routers>
</admin>

<global>
<blocks>
<enhancedgrid>
<class>TBT_Enhancedgrid_Block</class>
</enhancedgrid>
<enhancedgrid>
<class>TBT_Enhancedgrid_Block</class>
</enhancedgrid>
</blocks>
<helpers>
<enhancedgrid>
<class>TBT_Enhancedgrid_Helper</class>
</enhancedgrid>
</helpers>
<blocks>
<adminhtml>
<rewrite>
<widget_grid_column>TBT_Enhancedgrid_Block_Widget_Grid_Column</widget_grid_column>
<catalog_product>TBT_Enhancedgrid_Block_Catalog_Product</catalog_product>
</rewrite>
</adminhtml>
<adminhtml>
<rewrite>
<widget_grid_column>TBT_Enhancedgrid_Block_Widget_Grid_Column</widget_grid_column>
<catalog_product>TBT_Enhancedgrid_Block_Catalog_Product</catalog_product>
</rewrite>
</adminhtml>
</blocks>

<models>
<enhancedgrid>
<class>TBT_Enhancedgrid_Model</class>
</enhancedgrid>
</models>

<resources>
<enhancedgrid_setup>
<setup>
Expand All @@ -66,24 +60,7 @@
</connection>
</enhancedgrid_read>
</resources>

<rewrite>
<!-- @nelkaake -a 13/11/10: Added for Magento 1.4 compatibility -->
<tbt_enhancedgrid_catalog_product_export_csv>
<from><![CDATA[#^/admin/catalog_product/((exportCsv.*))/$#]]></from>
<to>/enhancedgrid/catalog_product/${1}/</to>
</tbt_enhancedgrid_catalog_product_export_csv>
<tbt_enhancedgrid_catalog_product_export_xml>
<from><![CDATA[#^/admin/catalog_product/((exportXml.*))/$#]]></from>
<to>/enhancedgrid/catalog_product/${1}/</to>
</tbt_enhancedgrid_catalog_product_export_xml>
<tbt_enhancedgrid_catalog_product>
<from><![CDATA[#^/adminhtml/catalog_product/((massProd.*))/$#]]></from>
<to>/enhancedgrid/catalog_product/${1}/</to>
</tbt_enhancedgrid_catalog_product>
</rewrite>
</global>

<adminhtml>
<layout>
<updates>
Expand All @@ -92,26 +69,25 @@
</enhancedgrid>
</updates>
</layout>
<menu>
<catalog module="enhancedgrid">
<children>
<products module="enhancedgrid" translate="title">
<title>Manage Products*</title>
<sort_order>0</sort_order>
<action>enhancedgrid/catalog_product</action>
</products>
</children>
</catalog>
</menu>
<menu>
<catalog module="enhancedgrid">
<children>
<products module="enhancedgrid" translate="title">
<title>Manage Products*</title>
<sort_order>0</sort_order>
<action>adminhtml/catalog_product</action>
</products>
</children>
</catalog>
</menu>
</adminhtml>

<default>
<enhancedgrid>
<general>
<isenabled>1</isenabled>
</general>
<columns>
<showcolumns>id,name,type_id,attribute_set_id,sku,price,qty,visibility,status,websites,thumbnail</showcolumns>
<showcolumns>id,name,type_id,sku,price,qty,visibility,status,websites,thumbnail</showcolumns>
<truncatelongtextafter>60</truncatelongtextafter>
</columns>
<images>
Expand All @@ -128,36 +104,35 @@
</defaults>
</enhancedgrid>
</default>

<adminhtml>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<catalog>
<children>
<enhancedgrid>
<title>Enhanced Product Grid</title>
</enhancedgrid>
</children>
</catalog>
<system>
<children>
<config>
<children>
<enhancedgrid>
<title>Enhanced Grid Config</title>
</enhancedgrid>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<catalog>
<children>
<enhancedgrid>
<title>Enhanced Product Grid</title>
</enhancedgrid>
</children>
</catalog>
<system>
<children>
<config>
<children>
<enhancedgrid>
<title>Enhanced Grid Config</title>
</enhancedgrid>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
40 changes: 0 additions & 40 deletions app/code/community/TBT/Enhancedgrid/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
</truncatelongtextafter>
<!--showimages translate="label">
<label>Show Product Images</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>30</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
</showimages-->
</fields>
</columns>
<images translate="label">
Expand Down Expand Up @@ -144,38 +136,6 @@
</dir>
</fields>
</defaults>
<!--export translate="label">
<label>Products Grid Export</label>
<sort_order>200</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<fields>
<isenabled translate="label">
<label>Enable Quick Export</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>10</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
</isenabled>
</fields>
</export-->
<!--search translate="label">
<label>Products Grid Search</label>
<sort_order>300</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<fields>
<isenabled translate="label">
<label>Enable Fulltext Search</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>50</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
</isenabled>
</fields>
</search-->
</groups>
</enhancedgrid>
</sections>
Expand Down

0 comments on commit 502b69a

Please sign in to comment.