The filters table is kind of unique that of the four columns in the table three of them are associated with the primary key leaving only one column that gets updated - the weight. As a result it seems redundant to add another function just to change the one column, so install_add_filter should be changed to update records if they already exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | install_profile_api-n412042-filters-API_fix.patch | 615 bytes | James Andres |
| #1 | install_profile_api-n412042-filters.patch | 1.28 KB | damienmckenna |
Comments
Comment #1
damienmckennaPatch attached that renames install_add_filter to install_set_filter.
Comment #2
damienmckennaCan has feedback? ^_^
Comment #3
James Andres commentedI agree, this is more useful. Committed.
Comment #4
webchickAck! In the future, can you please leave legacy wrappers around this stuff? 2.0 is a stable release. Sudden API changes are Not Nice. :(
Comment #5
James Andres commentedSorry, I wasn't aware 2.0 was tagged for release. Is there a discussion thread somewhere I should be following to keep informed?
Sorry,
James.
Comment #6
damienmckennaJames: What webchick means is that we should have left install_add_filter() intact so that the v6.x-2.x releases didn't loose any functions, i.e keeping its API stable.
Comment #7
James Andres commentedNo worries, should I roll it back?
Comment #8
webchickNo, I don't think you need to roll it back. Just maybe do something like:
Comment #9
James Andres commentedWow, I'm a moron. I thought I gave that patch a thorough inspection before committing, but I didn't notice the function name change.
Yes, I definitely see your point now. I'll re-roll in a non-API-breakage way.
Ooops,
James.
Comment #10
James Andres commentedHere is the patch with the now deprecated
install_add_filter($format_id, $module, $delta = 0, $weight = 0)included.To expedite the fix for those dealing with a broken install_profile_api, I've committed this.
Comment #11
webchickYay! Thanks, James. :) And no worries. I'm fine with occasional wrinkles as long as this module's getting some committer love. :D
Comment #12
webchick