You are here

function lingotek_set_profile_settings in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.6 lingotek.module \lingotek_set_profile_settings()
1 call to lingotek_set_profile_settings()
lingotek_admin_profile_form_submit in ./lingotek.admin.inc

File

./lingotek.module, line 1173

Code

function lingotek_set_profile_settings($profile_id, $settings) {

  // Profiles need to know each of their settings, since each profile
  // changes independently from all others.  There is no direct
  // inheritance tree for profiles.  There is only inheritance for
  // entities -> bundles.
  $global_profile = lingotek_get_global_profile();
  $profiles = lingotek_get_profiles();
  $differences = array_diff($settings, $global_profile);
  $profiles[$profile_id] = $differences;
  variable_set('lingotek_profiles', $profiles);
}