It could be helpful if some methods returned the value of the 'fcid' column. Candidates:

  • flag_flag::flag()
  • flag_flag::is_flagged()
  • flag_flag::_is_flagged()
  • flag_flag::_flag()
  • flag_flag::_unflag()

Why? Because contrib modules, or other contrib code, that store additional data for each flagging (the 'flag_history' module is one example) would then have easy access to the 'fcid'.

Currently, some of the above methods return a boolean. Changing them to return the 'fcid' instead (or NULL) won't affect their usage.

CommentFileSizeAuthor
#1 flag_return_fcid.patch2.04 KBquicksketch

Comments

quicksketch’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Code » Flag core
Status: Active » Fixed
StatusFileSize
new2.04 KB

I added this to the 2.x version only since this counts as an API change. The $fcid is returned for both flag() and unflag() but not for is_flagged(), since there may be multiple flagged values that need to be returned. In which case the developer may use flag_get_user_flags().

Status: Fixed » Closed (fixed)

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