You are here

function flag_lists::flag_lists_save in Flag Lists 7.3

Saves a flag to the database. It is a wrapper around update($flag) and insert($flag).

File

./flag_lists.inc, line 17
Implements flag lists.

Class

flag_lists
@file Implements flag lists.

Code

function flag_lists_save(&$flag) {
  if (isset($flag->fid)) {
    flag_lists_update($flag);
    $flag->is_new = FALSE;
  }
  else {
    flag_lists_insert($flag);
    $flag->is_new = TRUE;
  }

  // Clear the page cache for anonymous users.
  //    cache_clear_all('*', 'cache_page', TRUE);
}