Commit ecdf7b86 authored by sun's avatar sun

#304243 by sun: Code clean-up for wysiwyg_editor_profile_overview().

parent 92089616
......@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 6.x-x.x, xxxx-xx-xx
---------------------------
#304243 by sun: Code clean-up for wysiwyg_editor_profile_overview().
#289218 by gustav: Fixed E^ALL notice if node has no body field.
#304243 by sun: Code clean-up for wysiwyg_editor_user_status().
#299108 by toniw: Added setting for TinyMCE's auto-cleanup paste feature.
......
......@@ -414,6 +414,7 @@ function wysiwyg_editor_profile_form_submit($form, &$form_state) {
$form_state['values']['buttons'][$plugin] = array_filter($form_state['values']['buttons'][$plugin]);
$plugin_count += count($form_state['values']['buttons'][$plugin]);
}
// Store only enabled buttons.
$form_state['values']['buttons'] = array_filter($form_state['values']['buttons']);
// Filter enabled roles for this profile.
......@@ -481,9 +482,10 @@ function wysiwyg_editor_profile_overview() {
$usable = TRUE;
// Check if a Wysiwyg Editor is installed.
// Hard-coded for TinyMCE for now.
$tinymce_loc = drupal_get_path('module', 'wysiwyg_editor') .'/tinymce/';
$path_wysiwyg = drupal_get_path('module', 'wysiwyg_editor');
$tinymce_loc = $path_wysiwyg .'/tinymce/';
if (!is_dir($tinymce_loc)) {
drupal_set_message(t('Could not find the TinyMCE engine installed at <strong>!tinymce-directory</strong>. Please <a href="http://tinymce.moxiecode.com/">download TinyMCE</a>, uncompress it and copy the folder into !tinymce-path.', array('!tinymce-path' => drupal_get_path('module', 'wysiwyg_editor'), '!tinymce-directory' => $tinymce_loc)), 'error');
drupal_set_message(t('Could not find the TinyMCE engine installed at <strong>!tinymce-directory</strong>. Please <a href="!tinymce-url">download TinyMCE</a>, uncompress it and copy the folder into !tinymce-path.', array('!tinymce-directory' => $tinymce_loc, '!tinymce-url' => 'http://tinymce.moxiecode.com/download.php', '!tinymce-path' => $path_wysiwyg)), 'error');
$usable = FALSE;
}
// Check if at least one role is granted access to Wysiwyg Editor.
......
......@@ -559,7 +559,6 @@ function _wysiwyg_editor_page_match($profile) {
}
// Kill Wysiwyg Editor if we're editing a textarea with PHP in it!
// PHP input formats are #2 in the filters table.
if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'edit') {
$node = node_load(arg(1));
$filters = filter_list_format($node->format);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment