You are here

function flag_lists_get_flagged_content in Flag Lists 6

Same name and namespace in other branches
  1. 7.3 flag_lists.module \flag_lists_get_flagged_content()
  2. 7 flag_lists.module \flag_lists_get_flagged_content()

Get all flagged content in a flag.

Using this instead of flag_get_flagged_content() because we need to make sure that we use flag_lists_get_flags()

Parameters

The flag name for which to retrieve flagged content.:

1 call to flag_lists_get_flagged_content()
theme_flag_lists_user_list in ./flag_lists.module
Theme the output of user-defined list page

File

./flag_lists.module, line 748
The Flag Lists module.

Code

function flag_lists_get_flagged_content($fid, $uid) {
  $return = array();
  $flag = flag_lists_get_flag($fid);
  $result = db_query("SELECT * FROM {flag_lists_content} WHERE fid = %d AND uid = %d", $flag->fid, $uid);
  while ($row = db_fetch_object($result)) {
    $return[] = $row;
  }
  return $return;
}