You are here

function content_access_set_settings in Content Access 6

Same name and namespace in other branches
  1. 8 content_access.module \content_access_set_settings()
  2. 5 content_access.module \content_access_set_settings()
  3. 7 content_access.module \content_access_set_settings()

Saves the content_access settings - needs the complete settings array.

3 calls to content_access_set_settings()
content_access_admin_settings_submit in ./content_access.admin.inc
content_access_node_type in ./content_access.module
Implementation of hook_node_type(): Update settings on node type name change.
content_access_update_6001 in ./content_access.install
Upgrade from d5 to d6

File

./content_access.module, line 193
Content access module file.

Code

function content_access_set_settings($settings) {

  // Cleanup the settings before saving.
  foreach (content_access_available_settings() as $setting) {
    if (isset($settings[$setting])) {
      foreach ($settings[$setting] as $type => $value) {
        if (!isset($value)) {
          unset($settings[$setting][$type]);
        }
      }
    }
  }
  variable_set('content_access_settings', $settings);
}