Permalink
Browse files

2.0.0.0-dev37

* Refactored a variety of grids in backend (admin) to make them configurable through layout, rather than hard-coded. The following classes were affected (converted): `Mage_User_Block_User_Grid`, `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`, `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`, `Mage_Adminhtml_Block_Newsletter_Problem_Grid`, `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`, `Mage_Adminhtml_Block_System_Store_Grid`, `Mage_Adminhtml_Block_System_Email_Template_Grid`, `Mage_Adminhtml_Block_Sitemap_Grid`, `Mage_Adminhtml_Block_Catalog_Search_Grid`, `Mage_Adminhtml_Block_Urlrewrite_Grid`, `Mage_Adminhtml_Block_System_Variable_Grid`, `Mage_Adminhtml_Block_Report_Review_Customer_Grid`, `Mage_Adminhtml_Block_Report_Review_Product_Grid`
* Modified behavior of configuration merging. Each config file can be separately validated against DOM schema.
* Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and changed all child classes
* Changes in Profiler system:
  * Created separate component for handling Profiler Driver selection logic
  * Extended `Magento_Profiler::start()` calls with tags as second argument
* Bug fix - Added additional validation into `Mage_Adminhtml_Catalog_CategoryController` to prevent saving new category with any id using firebug
  • Loading branch information...
1 parent ca25f65 commit fee89fecad93a1f182550c1df5946eea16338f11 @magento-team magento-team committed Dec 29, 2012
Showing with 3,913 additions and 2,113 deletions.
  1. +10 −0 CHANGELOG.markdown
  2. +2 −2 app/Mage.php
  3. +15 −17 app/bootstrap.php
  4. +1 −1 app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
  5. +0 −1 app/code/core/Mage/Adminhtml/Block/Backup.php
  6. +0 −142 app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
  7. +0 −78 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
  8. +0 −178 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
  9. +0 −4 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
  10. +0 −102 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
  11. +0 −92 app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
  12. +0 −119 app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
  13. +0 −114 app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
  14. +0 −4 app/code/core/Mage/Adminhtml/Block/System/Design.php
  15. +0 −127 app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
  16. +1 −4 app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
  17. +0 −125 app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
  18. +0 −84 app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
  19. +0 −97 app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
  20. +0 −104 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
  21. +0 −125 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
  22. +60 −0 app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
  23. +3 −0 app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
  24. +4 −12 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
  25. +3 −4 app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
  26. +2 −6 app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
  27. +34 −31 app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
  28. +2 −4 app/code/core/Mage/Adminhtml/controllers/SitemapController.php
  29. +2 −3 app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
  30. +2 −5 app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
  31. +2 −5 app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
  32. +0 −1 app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
  33. +2 −3 app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
  34. +9 −19 app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
  35. +0 −3 app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
  36. +18 −3 app/code/core/Mage/Adminhtml/etc/config.xml
  37. +139 −0 app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml
  38. +1 −0 app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml
  39. +40 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
  40. +3 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml
  41. +83 −0 app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml
  42. +107 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml
  43. +123 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml
  44. +80 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml
  45. +105 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
  46. +2 −1 app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml
  47. +138 −0 app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml
  48. +78 −0 app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml
  49. +2 −2 app/code/core/Mage/Backend/etc/adminhtml/system.xml
  50. +54 −0 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php
  51. +45 −0 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php
  52. +58 −0 app/code/core/Mage/Backup/Model/Grid/Options.php
  53. +2 −2 app/code/core/Mage/Captcha/etc/adminhtml/system.xml
  54. +2 −2 app/code/core/Mage/Catalog/Model/Category.php
  55. +3 −3 app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
  56. +4 −4 app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
  57. +1 −1 app/code/core/Mage/Catalog/etc/adminhtml/system.xml
  58. +1 −1 app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml
  59. +62 −0 app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php
  60. +7 −0 app/code/core/Mage/CatalogSearch/etc/config.xml
  61. +158 −0 app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml
  62. +2 −1 app/code/core/Mage/Core/Block/Template.php
  63. +1 −1 app/code/core/Mage/Core/Model/App.php
  64. +2 −1 app/code/core/Mage/Core/Model/App/Area.php
  65. +3 −2 app/code/core/Mage/Core/Model/Config.php
  66. +3 −4 app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
  67. +11 −4 app/code/core/Mage/Core/Model/Resource/Website/Collection.php
  68. +47 −0 app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php
  69. +1 −1 app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
  70. +2 −2 app/code/core/Mage/Customer/etc/adminhtml/system.xml
  71. +4 −4 app/code/core/Mage/Directory/Block/Data.php
  72. +1 −1 app/code/core/Mage/Directory/Helper/Data.php
  73. +1 −1 app/code/core/Mage/Directory/etc/adminhtml/system.xml
  74. +6 −5 app/code/core/Mage/Eav/Model/Config.php
  75. +64 −0 app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
  76. +2 −2 app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml
  77. +49 −0 app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php
  78. +21 −21 app/code/core/Mage/Ogone/etc/adminhtml/system.xml
  79. +1 −1 app/code/core/Mage/Paygate/etc/adminhtml/system.xml
  80. +1 −1 app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml
  81. +1 −1 app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml
  82. +27 −27 app/code/core/Mage/Paypal/etc/adminhtml/system.xml
  83. +13 −1 app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php
  84. +12 −1 app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php
  85. +206 −0 app/code/core/Mage/Reports/view/adminhtml/layout.xml
  86. +1 −1 app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php
  87. +2 −2 app/code/core/Mage/Sales/etc/adminhtml/system.xml
  88. +7 −0 app/code/core/Mage/Sitemap/etc/config.xml
  89. +109 −0 app/code/core/Mage/Sitemap/view/adminhtml/layout.xml
  90. +48 −0 app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php
  91. +1 −1 app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
  92. +0 −82 app/code/core/Mage/User/Block/Role/Grid.php
  93. +0 −107 app/code/core/Mage/User/Block/User/Grid.php
  94. +48 −0 app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php
  95. +14 −21 .../User/Block/Role/GridTest.php → app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php
  96. +62 −0 app/code/core/Mage/User/Model/Statuses.php
  97. +1 −1 app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php
  98. +1 −1 app/code/core/Mage/User/controllers/Adminhtml/UserController.php
  99. +134 −8 app/code/core/Mage/User/view/adminhtml/layout.xml
  100. +1 −1 app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
  101. +1 −0 dev/build/build.properties
  102. +1 −0 dev/build/build.xml
  103. +3 −0 dev/build/publication/extruder/common.txt
  104. +1 −0 dev/build/publication/sanity/ce.xml
  105. +1 −0 dev/build/publication/sanity/ee.xml
  106. +4 −12 dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php
  107. +9 −7 dev/tests/integration/framework/bootstrap.php
  108. +4 −4 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php
  109. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php
  110. +22 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php
  111. +1 −1 ...tegration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php
  112. +1 −1 ...ests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php
  113. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php
  114. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php
  115. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
  116. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php
  117. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php
  118. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php
  119. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php
  120. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php
  121. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php
  122. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php
  123. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php
  124. +1 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php
  125. +1 −1 dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php
  126. +1 −1 dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php
  127. +3 −3 dev/tests/integration/testsuite/Mage/{Adminhtml → Backend}/Utility/Controller.php
  128. +1 −1 dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php
  129. +1 −1 dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php
  130. +1 −1 dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php
  131. +1 −1 ...egration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
  132. +1 −1 dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
  133. +1 −1 ...ration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php
  134. +1 −1 dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php
  135. +1 −1 dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php
  136. +1 −1 dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php
  137. +1 −1 dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php
  138. +1 −1 dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php
  139. +1 −1 dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php
  140. +5 −3 dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
  141. +141 −0 dev/tests/integration/testsuite/Magento/ProfilerTest.php
  142. +15 −0 dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php
  143. +15 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
  144. +0 −3 dev/tests/unit/testsuite/Magento/Config/DomTest.php
  145. +3 −1 dev/tests/unit/testsuite/Magento/Config/ViewTest.php
  146. +1 −1 dev/tests/unit/testsuite/Magento/Config/XsdTest.php
  147. +1 −4 dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml
  148. +128 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php
  149. +68 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
  150. +131 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php
  151. +53 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
  152. +116 −5 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php
  153. +81 −24 dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php
  154. +133 −3 dev/tests/unit/testsuite/Magento/ProfilerTest.php
  155. +53 −9 lib/Magento/Config/Dom.php
  156. +14 −16 .../Mage/Adminhtml/view/adminhtml/catalogsearch.xml → lib/Magento/Config/Dom/ValidationException.php
  157. +14 −24 lib/Magento/Config/XmlAbstract.php
  158. +111 −1 lib/Magento/Profiler.php
  159. +82 −0 lib/Magento/Profiler/Driver/Factory.php
  160. +105 −7 lib/Magento/Profiler/Driver/Standard.php
  161. +30 −11 lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php
  162. +85 −0 lib/Magento/Profiler/Driver/Standard/Output/Factory.php
  163. +33 −3 lib/Magento/Profiler/Driver/Standard/Output/Firebug.php
  164. +37 −0 lib/Magento/Profiler/Driver/Standard/OutputAbstract.php
View
@@ -1,3 +1,13 @@
+2.0.0.0-dev37
+=============
+* Refactored a variety of grids in backend (admin) to make them configurable through layout, rather than hard-coded. The following classes were affected (converted): `Mage_User_Block_User_Grid`, `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`, `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`, `Mage_Adminhtml_Block_Newsletter_Problem_Grid`, `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`, `Mage_Adminhtml_Block_System_Store_Grid`, `Mage_Adminhtml_Block_System_Email_Template_Grid`, `Mage_Adminhtml_Block_Sitemap_Grid`, `Mage_Adminhtml_Block_Catalog_Search_Grid`, `Mage_Adminhtml_Block_Urlrewrite_Grid`, `Mage_Adminhtml_Block_System_Variable_Grid`, `Mage_Adminhtml_Block_Report_Review_Customer_Grid`, `Mage_Adminhtml_Block_Report_Review_Product_Grid`
+* Modified behavior of configuration merging. Each config file can be separately validated against DOM schema.
+* Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and changed all child classes
+* Changes in Profiler system:
+ * Created separate component for handling Profiler Driver selection logic
+ * Extended `Magento_Profiler::start()` calls with tags as second argument
+* Bug fix - Added additional validation into `Mage_Adminhtml_Catalog_CategoryController` to prevent saving new category with any id using firebug
+
2.0.0.0-dev36
=============
* Visual design editor refactored
View
@@ -170,7 +170,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '36',
+ 'number' => '37',
);
}
@@ -466,7 +466,7 @@ public static function addObserver($eventName, $callback, $data = array(), $obse
*/
public static function dispatchEvent($name, array $data = array())
{
- Magento_Profiler::start('EVENT:' . $name);
+ Magento_Profiler::start('EVENT:' . $name, array('group' => 'EVENT', 'name' => $name));
$result = self::app()->dispatchEvent($name, $data);
Magento_Profiler::stop('EVENT:'.$name);
return $result;
View
@@ -96,22 +96,20 @@
Mage::initializeObjectManager($definitionsFile);
}
-$output = null;
-if (isset($_SERVER['MAGE_PROFILER'])) {
- switch ($_SERVER['MAGE_PROFILER']) {
- case 'firebug':
- $output = new Magento_Profiler_Driver_Standard_Output_Firebug();
- break;
- case 'csv':
- $output = new Magento_Profiler_Driver_Standard_Output_Csvfile(__DIR__ . '/../var/log/profiler.csv');
- break;
- default:
- $output = new Magento_Profiler_Driver_Standard_Output_Html();
- }
-}
+if (!empty($_SERVER['MAGE_PROFILER'])) {
+ $profilerConfigData = $_SERVER['MAGE_PROFILER'];
-if ($output) {
- $driver = new Magento_Profiler_Driver_Standard();
- $driver->registerOutput($output);
- Magento_Profiler::add($driver);
+ $profilerConfig = array(
+ 'baseDir' => dirname(__DIR__),
+ 'tagFilters' => array()
+ );
+
+ if (is_scalar($profilerConfigData)) {
+ $profilerConfig['driver'] = array(
+ 'output' => is_numeric($profilerConfigData) ? 'html' : $profilerConfigData
+ );
+ } elseif (is_array($profilerConfigData)) {
+ $profilerConfig = array_merge($profilerConfig, $profilerConfigData);
+ }
+ Magento_Profiler::applyConfig($profilerConfig);
}
@@ -37,7 +37,7 @@
<label>Email Address of Your Moneybookers Account</label>
<comment>
<![CDATA[To have access to the international payment network of Moneybookers please register <a href="http://www.moneybookers.com/partners/magento/" target="_blank">here</a> for a free account if you don't have one yet.]]>
-</comment>
+ </comment>
</field>
<field id="customer_id" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Customer ID</label>
@@ -58,7 +58,6 @@ protected function _prepareLayout()
'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
'class' => ''
));
- $this->addChild('backupsGrid', 'Mage_Adminhtml_Block_Backup_Grid');
$this->addChild('dialogs', 'Mage_Adminhtml_Block_Backup_Dialogs');
}
@@ -1,142 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml backups grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Backup_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- $this->setSaveParametersInSession(true);
- $this->setId('backupsGrid');
- $this->setDefaultSort('time', 'desc');
- }
-
- /**
- * Init backups collection
- */
- protected function _prepareCollection()
- {
- $collection = Mage::getSingleton('Mage_Backup_Model_Fs_Collection');
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare mass action controls
- *
- * @return Mage_Adminhtml_Block_Backup_Grid
- */
- protected function _prepareMassaction()
- {
- $this->setMassactionIdField('id');
- $this->getMassactionBlock()->setFormFieldName('ids');
-
- $this->getMassactionBlock()->addItem('delete', array(
- 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'),
- 'url' => $this->getUrl('*/*/massDelete'),
- 'confirm' => Mage::helper('Mage_Backup_Helper_Data')->__('Are you sure you want to delete the selected backup(s)?')
- ));
-
- return $this;
- }
-
- /**
- * Configuration of grid
- *
- * @return Mage_Adminhtml_Block_Backup_Grid
- */
- protected function _prepareColumns()
- {
- $url7zip = Mage::helper('Mage_Adminhtml_Helper_Data')->__('The archive can be uncompressed with <a href="%s">%s</a> on Windows systems', 'http://www.7-zip.org/', '7-Zip');
-
- $this->addColumn('time', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Time'),
- 'index' => 'date_object',
- 'type' => 'datetime',
- 'width' => 200
- ));
-
- $this->addColumn('display_name', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Name'),
- 'index' => 'display_name',
- 'filter' => false,
- 'sortable' => true,
- 'width' => 350
- ));
-
- $this->addColumn('size', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Size, Bytes'),
- 'index' => 'size',
- 'type' => 'number',
- 'sortable' => true,
- 'filter' => false
- ));
-
- $this->addColumn('type', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Type'),
- 'type' => 'options',
- 'options' => Mage::helper('Mage_Backup_Helper_Data')->getBackupTypes(),
- 'index' => 'type',
- 'width' => 300
- ));
-
- $this->addColumn('download', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Download'),
- 'format' => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type'))
- . '">$extension</a> &nbsp; <small>('.$url7zip.')</small>',
- 'index' => 'type',
- 'sortable' => false,
- 'filter' => false
- ));
-
- if (Mage::helper('Mage_Backup_Helper_Data')->isRollbackAllowed()){
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Action'),
- 'type' => 'action',
- 'width' => '80px',
- 'filter' => false,
- 'sortable' => false,
- 'actions' => array(array(
- 'url' => '#',
- 'caption' => Mage::helper('Mage_Backup_Helper_Data')->__('Rollback'),
- 'onclick' => 'return backup.rollback(\'$type\', \'$time\');'
- )),
- 'index' => 'type',
- 'sortable' => false
- ));
- }
-
- return $this;
- }
-
-}
@@ -1,78 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * description
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('setGrid');
- $this->setDefaultSort('set_name');
- $this->setDefaultDir('ASC');
- $this->setSaveParametersInSession(true);
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection')
- ->setEntityTypeFilter(Mage::registry('entityType'));
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- /*$this->addColumn('set_id', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('ID'),
- 'align' => 'right',
- 'sortable' => true,
- 'width' => '50px',
- 'index' => 'attribute_set_id',
- ));*/
-
- $this->addColumn('set_name', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Set Name'),
- 'align' => 'left',
- 'sortable' => true,
- 'index' => 'attribute_set_name',
- ));
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id'=>$row->getAttributeSetId()));
- }
-
-}
Oops, something went wrong.

0 comments on commit fee89fe

Please sign in to comment.