Closed (fixed)
Project:
Flag
Version:
6.x-2.x-dev
Component:
Flag core
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Aug 2009 at 12:47 UTC
Updated:
27 Sep 2009 at 23:10 UTC
Currently we have this functionality in the Rules integration. This patch moves it to an API function and let Rules use that function.
| Comment | File | Size | Author |
|---|---|---|---|
| flag-trim-api.patch | 2.27 KB | amitaibu |
Comments
Comment #1
ajayg commentedFrom what I gather from patch you are just unflagging flags beyond cutoff point. This is not a real trim in the sense that it won't actually delete the flag record from the database. Am I correct? If this is correct then the flag entries will just continue to grow and may not benefit in the long term for performance and storage. This is not worse than the current but loosing the potential benefits possible. Shouldn't we actuall delete the records?
Comment #2
amitaibu> This is not a real trim in the sense that it won't actually delete the flag record from the database. Am I correct?
No. This patch only moves to an API the Rules action to trim a flag (which removes flags - i.e. delete their records).
Comment #3
ajayg commentedSOrry for asking stupid question. I get that whatever was part of Rules action is now moved to API. But I still don't get where we actually delete the record? I looked at the patch above and as part of trim you are just unflagging. Does this mean the rules will be deleting the records after call to this API? Would n't be nice this is available as 6.x core action so there is no need for rules module?
Comment #4
ajayg commentedOk I see what you are doing. Just refactoring and moving code from "flag_rules_action_trim" to another seperate function flag_trim_flag.
But what is real value addition of original flag_rules_action_trim as all it is doing is calling flag_trim_flag? Sorry if I am asking too many dumb questions.
Comment #5
amitaibu> But what is real value addition of original flag_rules_action_trim as all
See this doc - http://drupal.org/node/407070
Comment #6
ajayg commentedComment #7
ajayg commentedComment #8
quicksketchCommitted to the 2.x branch (not sure why I can't get this tagged as 2.x yet since the branch exists).
Comment #9
quicksketch