Thursday 9 April 2009

Fixing getDesign Bugs

I change the way Mage::getDesign functions. It simply wraps up a call to Mage::getSingleton('core/design_package'). But, I found that not all of the code was updated, some spots still called the getSingleton() method. Why would you wrap up a function like that but not search and replace for all occurances?

After I found the problem it was pretty easy to find the 3 other spots and fix them. But it raises the question about how people are doing refactoring in the Magento core. It's not with search and replace, it's not with any IDE refactor plugin, because both of those methods would have caught the other spots. It must be laissez-faire refactoring.

No comments: