function wysiwyg_profile_break_lock_confirm_submit in Wysiwyg 6.2
Same name and namespace in other branches
- 7.2 wysiwyg.admin.inc \wysiwyg_profile_break_lock_confirm_submit()
Submit handler to break_lock a profile.
File
- ./
wysiwyg.admin.inc, line 863 - Integrate Wysiwyg editors into Drupal.
Code
function wysiwyg_profile_break_lock_confirm_submit(&$form, &$form_state) {
$format = $form_state['values']['format'];
// Only the CTools cache handles locks.
if (module_exists('ctools')) {
ctools_include('object-cache');
ctools_object_cache_clear_all('wysiwyg_profile', 'format' . $format);
}
if ($profile = wysiwyg_profile_load($format)) {
$form_state['redirect'] = 'admin/settings/wysiwyg/profile/' . $format . '/edit';
drupal_set_message(t('The lock has been broken and you may now edit this profile.'));
}
else {
$form_state['redirect'] = 'admin/settings/wysiwyg/profile';
drupal_set_message(t('The lock has been broken and you may now create a new profile.'));
}
}