You are here

function regcode_tag_action in Registration codes 6.2

Same name and namespace in other branches
  1. 7.2 regcode.module \regcode_tag_action()
  2. 7 regcode.module \regcode_tag_action()

Regcode tag action.

1 string reference to 'regcode_tag_action'
regcode_views_default_views in ./regcode.views_default.inc
Implements hook_views_default_views().

File

./regcode.module, line 588

Code

function regcode_tag_action(&$object, $context = array()) {

  // Apply terms
  foreach ($context['apply_terms'] as $term) {
    db_query('REPLACE INTO {regcode_term} (rid, tid) VALUES (%d, %d)', $object->rid, $term);
  }

  // Remove terms
  foreach ($context['remove_terms'] as $term) {
    db_query('DELETE FROM {regcode_term} WHERE rid=%d AND tid=%d', $object->rid, $term);
  }
}