This patch contains the API additions from #475366: Flag queue. It adds the following API functions:

- flag_get_flag_counts(): Get a count of flagged items within a flag.
- flag_get_flagged_content(): Get a list of all flagged content within a flag.
- flag_get_content_id(): Get a content ID (such as a NID) given a flag content ID.
- Additions to flag_get_content_flags(): Add a $flag_name parameter to limit results to a specific flag.

Note that I've modified these functions since the last patch in #533424: Add hook_flag_options_alter() (create a 2.x branch). with a few changes:
- We should use $flag_name instead of $fid in all public API functions.
- I merged flag_get_fcid_from_content_id() with flag_get_content_flags() since they retrieve similar data.

Comments

quicksketch’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
amitaibu’s picture

I've added 2 comments in flag_get_content_flags() to clarify a bit what's going on there. If they are ok then RTBC.

quicksketch’s picture

Status: Needs review » Fixed

Great, committed.

Status: Fixed » Closed (fixed)

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

mooffie’s picture

Issue tags: +flag queue

Tagging.