You are here

function content_access_update_7101 in Content Access 7

Convert content type settings to a new features-friendly storage format.

File

./content_access.install, line 43
Content access install file.

Code

function content_access_update_7101() {
  $settings = variable_get('content_access_settings', array());
  $settings_new = array();
  foreach ($settings as $setting => $data) {
    foreach ($data as $type_name => $value) {
      $settings_new[$type_name][$setting] = $value;
    }
  }
  foreach ($settings_new as $type_name => $data) {
    variable_set('content_access_' . $type_name, $data);
  }
  variable_del('content_access_settings');
}