Closed rafaelpatro closed 2 years ago
I really don't think it was for any security reason. I think it could be changed and it would be an improvement, but then it might also break some extensions which assume it was done the old way..
I dont consider it breaking more than any bugfix. I dont see a usecase where somebody would rely on block being anonym.
It would take a lot of effort, probably resulting in a controller rewrite in many cases which wouldn't get broken since the update would be effectively bypassed. So I'm with you on accepting the change, but my personal sample size of extensions is small; does anyone have any examples of extensions updating grids that would be harmed by this change?
I'm closing this issue since it doesn't have feedback since 3 years, also it would be a huge amount of work to fix it, for a really small benefit. You're welcome to reopen it if you feel so, possible with a PR.
Hi guys! Do you know why the hell some important grids in backend were developed using anonymous blocks? There is no _adminhtml_sales_shipmentgrid, or _adminhtml_sales_invoicegrid, _or adminhtml_sales_creditmemogrid. Instead of we have anonymous blocks in these controllers... https://github.com/OpenMage/magento-lts/blob/f78f0c2421555d3c3f0f18f17a86cdd2a7315972/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php#L65
On the other hand we have _adminhtml_sales_ordergrid perfectly designed. So we can easily apply class block methods... add export type, remove columns, add columns... https://github.com/OpenMage/magento-lts/blob/1.9.3.x/app/design/adminhtml/default/default/layout/sales.xml#L32
Example: add a custom column...
Is there a sensible reason why that blocks were not designed as order block? A security risk or something else? Could it be an improvement for this project?