static function FlagUpdate_2::update in Flag 7.3
The update function for the flag.
File
- includes/
flag.export.inc, line 320  - Import/Export functionality provided by Flag module.
 
Class
- FlagUpdate_2
 - Flag update class for API 1 flags -> API 2.
 
Code
static function update(&$flag) {
  if (isset($flag->roles) && !isset($flag->roles['flag'])) {
    $flag->roles = array(
      'flag' => $flag->roles,
      'unflag' => $flag->roles,
    );
  }
}