Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As a response to your comment.
The bug didn't manifest itself in the Drupal 7 branch. I did however port the update flag in the term form and updated the _taxonomy_title_update function in favor of the delete/insert solution.
Comment | File | Size | Author |
---|---|---|---|
#2 | use_a_true_update-1359364-2.patch | 1.29 KB | joostpluijmers |
less-spartan-update-function.patch | 1.92 KB | joostpluijmers |
Comments
Comment #1
jenlampton1) Updated the issue title so others can figure out what this patch is intended to do.
2) We don't need to run two queries to do an update anymore (in D6 we had to test to see if something existed, and then we had to either do an insert or an update, accordingly) in D7, we have db_merge. Here is an example of how it is used for a taxonomy update. We can do something similar.
3) Let's not add the extra form element + check in this patch. Let's keep it to the cleanup of the update function.
Good work, thanks for your help on these :)
Comment #2
joostpluijmers CreditAttribution: joostpluijmers commentedThanks for the tip on db_merge(). I haven't fully immersed myself into the new D7 database functions yet.
This patch should take care of the update function. Should I submit another ticket to add the 'delete on empty title' function? Or do you have other ideas for the D7 branch?
Comment #3
jenlampton@joostpluijmers next time you provide a patch, please change the status back to needs review :)
Comment #4
jenlamptonThis patch looks great. I think we should commit this as-is, and the 'empty title' changes can be added in this other issue relating to errors associated with empty titles: #1236838: Error when adding tags to an article