Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2006 at 22:16 UTC
Updated:
5 Nov 2014 at 14:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Frando commentedsetting proper states.
Comment #2
profix898 commentedI think you should remove the wildcard functionality from variable_del() for now. New features will not go into Drupal 5 anymore. We also discussed the exact modification to variable_del() some weeks ago and it was rejected.
Comment #3
sunMarking as duplicate of #138544: Allow multiple variable deletes in variable_del()
Comment #4
stokito commented+1
Comment #5
stokito commentedUsing of #138544: Allow multiple variable deletes in variable_del() is stupid. This solution is more powerful.
Comment #6
joshmillerI've looked at this patch and it will need more than porting. I like the feature idea, but I think we need to start from scratch on how to implement.
Comment #7
sun.core commentedProper status.
Comment #8
sun.core commentedComment #9
catchDowngrading all D8 criticals to major per http://drupal.org/node/45111
Comment #10
mile23As per #6: Add a function called variable_del_prefix($prefix). Thus variables named mymodule_foo and mymodule_bar would both be deleted by calling variable_del_prefix('mymodule_');
This has a few main benefits:
1) You can delete all variables in your namespace in one go, without potentially demolishing anything else if you have the wrong wildcard somewhere.
2) It imposes (in a very small way) a best practice on developers, such that they standardize their variable names for convenience in hook_uninstall().
3) It could be refactored for efficiency after #138544: Allow multiple variable deletes in variable_del() finally happens.
4) Easy backport to D7. Which I'd really like to see. Please. O please.
Comment #11
dave reidI actually think this is a bad idea as it could easily blow away unintended variables.
Comment #12
mile23"I actually think this is a bad idea as it could easily blow away unintended variables."
Which unintended variables would those be? The ones that someone else set with my module name as their namespace? variable_del() suffers from the same problem. :-)
Comment #13
catchviews vs. views_bulk_operations
image vs. imagecache.
Comment #14
wim leersComment #15
mile23I'm going to go out on a limb and say this is no longer a thing.
Comment #16
catchYes we can call this a duplicate of state/CMI.