Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Developer experience
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Sep 2011 at 00:07 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent
Comments
Comment #1
rfayComment #2
rfayForcing test
Comment #3
rszrama commentedTagging.
Comment #4
rszrama commentedWas looking to put this in this morning, but on review I noticed that you're changing the logic with respect to hook_modules_enabled(). In those hooks, our various field creation functions were just supposed to look for newly defined bundles in modules that were just enabled and add fields to them where necessary. In your patch, you're switching it so that any time the hook is invoked without specifying any modules, you look through every enabled module for newly defined bundles and re-attempt to add fields.
Functionally, your code does more now, but I'm not even sure what would result in hook_modules_enabled() being called without anything in the $modules array. Is there something you came across in testing that this fixes?
Comment #5
rfayIf I changed the logic it was a mistake. My intent was only to refractor.
Comment #6
rszrama commentedNo worries - I just thought maybe you found a use case where hook_modules_enabled() wasn't being provided a list of enabled modules. It's easy enough to undo, but I didn't wanna just change it in case Commerce Repair depended on that
if (empty($modules))check.Suppose it'll work fine without it?
Comment #7
rfayOK, so I was wrong. I was trying to make it so that all the "rebuild fields" functions worked the same. For this one, I did change the interface so you could call it with NULL (probably should have been array()) and it would check everything.
IMO this *didn't* change what happens in any normal situation (where the incoming array must by definition be populated). But it did make it so you could do basically what the other related functions do.
I *can* reroll commerce_repair to get the list of modules ahead of time and call with that; it makes the code there less consistent, but that's not as important if you object to how this works.
Comment #8
rszrama commentedOk, committed as is with a little more comments. I also moved the other configuration functions to be next to these in the code.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/799af4a
Comment #9
rfayThanks Ryan - I've updated the project page.