You are here

function wysiwyg_ui_profile_cache_set in Wysiwyg 6.2

Same name and namespace in other branches
  1. 7.2 wysiwyg.module \wysiwyg_ui_profile_cache_set()

Specialized cache function to add a profile to the editing cache.

1 call to wysiwyg_ui_profile_cache_set()
wysiwyg_profile_overview_submit in ./wysiwyg.admin.inc
Submit callback for Wysiwyg profile overview form.

File

./wysiwyg.module, line 833
Integrates client-side editors with Drupal.

Code

function wysiwyg_ui_profile_cache_set(&$profile) {
  if (!empty($profile->locked)) {
    drupal_set_message(t('Changes can not be made to a locked profile.'), 'error');
    return;
  }
  $profile->changed = TRUE;
  if (module_exists('ctools')) {
    ctools_include('object-cache');
    ctools_object_cache_set('wysiwyg_profile', $profile->name, $profile);
  }
  else {
    cache_set('wysiwyg_profile:' . $profile->name, $profile);
  }
}