chx told me that those update helper functions may vanish at some point. So we're better off with the manual query. Also, we just need the {node_type}.type, nothing else.
+++ mollom.install 12 Sep 2010 19:02:50 -0000
@@ -536,3 +536,41 @@ function mollom_update_7005() {
+ // @todo Do we also have to update Mollom data in {mollom}?
+++ mollom.install 12 Sep 2010 19:02:50 -0000
@@ -536,3 +536,41 @@ function mollom_update_7005() {
+ // Using db_merge() instead of db_insert() to account for manually performed
+ // updates or re-configuration.
db_merge() is actually not what we want. In case the new row already exists, we don't want to touch it.
Comments
Comment #1
sunAdding proper Field API support is left for #791792: Comment form doesn't support fields
Comment #2
dries commentedLooks good. Committed to CVS HEAD. Thanks.
Comment #3
sunSorry, I forgot that we need a module update, too.
Comment #4
sunThis should cut it. Not tested yet.
Comment #5
sunchx told me that those update helper functions may vanish at some point. So we're better off with the manual query. Also, we just need the {node_type}.type, nothing else.
This @todo mainly targets #909484: Add {mollom}.form_id and store originating form_id for session values -- not sure why we didn't store the form_id in the first place, since lots of code in Mollom module can be simplified with that info.
Powered by Dreditor.
Comment #6
sundb_merge() is actually not what we want. In case the new row already exists, we don't want to touch it.
Powered by Dreditor.
Comment #7
sunAnd we should also delete the 'comment_form' row at the end. Thanks, Dries! :)
Comment #8
pwolanin commentedUpdated the patch per comments above.
Quick local testing with faked up SQL rows looks ok.
Comment #9
sunThanks for reporting, reviewing, and testing! Committed to HEAD.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.