Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
So here comes the for the cleanup variables in the comment_notify.install
Comment | File | Size | Author |
---|---|---|---|
#2 | 326310_comment_notify_uninstall.d5.patch | 1.72 KB | aclight |
comment_notify_install_d6.patch | 1.75 KB | tobiasb | |
Comments
Comment #1
gregglesThanks so much, Razorraser. I'm marking this "to be ported" for the 5.x branch. I'm not sure how much longer I'll be maintaining that version, but it's good to keep track of these things at least.
Comment #2
aclight CreditAttribution: aclight commentedHere's a direct backport of the patch for D5.
It seems that typically in core and other contrib modules, deleting of variables is done not with a single SQL query (as this patch uses)
but with a call to variable_del() for each variable that needs to be deleted. I think this is a safer way to do things that eliminates the chance of accidentally deleting a variable that the module itself doesn't control. But that can be changed in a separate issue if necessary.
Comment #3
gregglesThat's certainly true that this is a little dangerous, but this is also fairly common in contrib (and much easier).
And really, if another module is using the comment_notify namespace...shame on them.
I would certainly like to clean this up in the future, though.
Comment #4
aclight CreditAttribution: aclight commentedGranted, using variables out of the namespace of the module they are created by is a bad idea. But then comment_notify itself uses and deletes a variable named "node_notify_default_mailtext". At least there isn't (yet) a module named node_notify.