Closed (fixed)
Project:
Flag
Version:
6.x-2.x-dev
Component:
Flag core
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2011 at 04:40 UTC
Updated:
23 Feb 2011 at 11:50 UTC
When I wrote the flag classes I left two utility functions, flag_access() and flag_content_enabled(), out because we didn't have nifty method implementations for them back then. They were to be used by flag_get_flags() only, and using them outside this context is not necessary. Therefore, getting rid of any of them shouldn't break existing 3rd party code (if it is, that code needs to be fixed; it's better doing this now instead of maintaining this to the end of our days).
_flag_format_plural() too can be dropped: it's from the D5 days.
Comments
Comment #1
quicksketchSounds good to me. I personally kind of like flag_access() but it's really just an unnecessary wrapper. I think the best reason to get rid of it is so that we don't accidentally collide with hook_access(). Removing _flag_format_plural() can definitely be killed.
Comment #2
mooffie commentedFixed.
http://drupal.org/cvs?commit=497300
http://drupal.org/cvs?commit=497302
(And I renamed flag_content_enabled() to _flag_content_enabled().)
Great. Let's rewrite Flag to not use OOP at all. (That was irony. Really, why do we have flag_trim_flag() and flag_reset_flag() instead of $flag->trim() etc.?)