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

quicksketch’s picture

Sounds 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.

mooffie’s picture

Status: Active » Fixed

Fixed.
http://drupal.org/cvs?commit=497300
http://drupal.org/cvs?commit=497302

(And I renamed flag_content_enabled() to _flag_content_enabled().)

I personally kind of like flag_access()

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.?)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.