You are here

function cas_attributes_update_7100 in CAS Attributes 7

File

./cas_attributes.install, line 49
Installation hooks for the CAS Attributes module.

Code

function cas_attributes_update_7100() {
  $attr = variable_get('cas_attributes', array());
  if (array_key_exists('relations', $attr)) {
    foreach ($attr['relations'] as $key => $value) {
      $attr['relations'][$key] = preg_replace('/\\[cas:attribute:([^:\\?\\]]*)]/', '[cas:attribute:$1:first]', $value);
    }
  }
  variable_set('cas_attributes', $attr);
}