You are here

function insight_alert_update_active in Insight 7

4 calls to insight_alert_update_active()
insight_alert_activate in ./insight.module
insight_alert_dismiss in ./insight.module
insight_alert_ignore in ./insight.module
insight_alert_ignore_dismiss in ./insight.module

File

./insight.module, line 379

Code

function insight_alert_update_active($iaid, $active, $update_time = FALSE) {
  $fields = array(
    'active' => $active,
  );
  if ($update_time) {
    $fields['created'] = REQUEST_TIME;
  }
  $query = db_update('insight_alert')
    ->fields($fields)
    ->condition('iaid', $iaid)
    ->execute();
}