diff --git a/ckeditor.ckeditor.inc b/ckeditor.ckeditor.inc index 050a3e4..d5923f4 100644 --- a/ckeditor.ckeditor.inc +++ b/ckeditor.ckeditor.inc @@ -16,10 +16,9 @@ function ckeditor_ckeditor_plugin() { $pattern = '#\.addButton\([\s]*[\'"](.*?)[\'"][\s]*\,[\s]*\{[\s]*(.*?)[\s]*\}#s'; /* - * CKEditor build-in plugins + * CKEditor built-in plugins. */ $_editor_path = ckeditor_path('local'); - //die($editor_path); if ($_editor_path != '') { if (file_exists($_editor_path . '/plugins/tableresize/plugin.js')) { $plugins['tableresize'] = array( @@ -115,7 +114,7 @@ function ckeditor_ckeditor_plugin() { } /* - * CKEditor module plugins + * Plugins located directly in the CKEditor module folder. */ $_plugin_dir = ckeditor_module_path('local') . '/plugins/'; if ($handle = opendir($_plugin_dir)) { @@ -157,7 +156,7 @@ function ckeditor_ckeditor_plugin() { } /* - * CKEditor module plugins - additional directory + * Plugins located in a folder specified in the CKEditor Global Profile. */ $_plugin_dir_additional = ckeditor_plugins_path('local') . '/'; if ($_plugin_dir != $_plugin_dir_additional && is_dir($_plugin_dir_additional) && $handle = opendir($_plugin_dir_additional)) { @@ -213,7 +212,7 @@ function ckeditor_ckeditor_plugin_alter(&$plugins) { if (isset($plugins['imce']) && module_exists('imce') == FALSE) { unset($plugins['imce']); } - //remove page break button if there is no module to do this + // Remove page break button if there is no module to handle it. if (isset($plugins['drupalbreaks']['buttons']['DrupalPageBreak']) && !module_exists('paging') && !module_exists('pagebreak')) { unset($plugins['drupalbreaks']['buttons']['DrupalPageBreak']); } diff --git a/ckeditor.install b/ckeditor.install index 2c401dc..8422690 100644 --- a/ckeditor.install +++ b/ckeditor.install @@ -591,9 +591,9 @@ function ckeditor_update_7006() { $available_plugins = ckeditor_load_plugins(); $profiles = ckeditor_profile_load(); - // Media wysiwyg now supplies the media plugin, as it has been removed from - // CKeditor. + // Media wysiwyg now supplies the media plugin, as it has been removed from CKEditor. $media_wysiwyg_enabled = isset($available_plugins['media']); + $profiles_using_media = array(); foreach ($profiles as $profile) { if (isset($profile->settings['loadPlugins'], $profile->settings['loadPlugins']['media'])) { @@ -601,7 +601,8 @@ function ckeditor_update_7006() { $profile->settings['loadPlugins']['media'] = $available_plugins['media']; } else { - throw new DrupalUpdateException(t('The "@profile" CKEdtior profile is using the media plugin. Support for the media module has now moved to media wysiwyg, please enable it to continue.', array('@profile' => $profile->name))); + $profiles_using_media[] = $profile->name; + unset($profile->settings['loadPlugins']['media']); } db_update('ckeditor_settings') @@ -613,6 +614,9 @@ function ckeditor_update_7006() { } } + if (!empty($profiles_using_media)) { + return t('The following CKEditor profiles were using the media plugin: @profiles. Support for the !media module has now moved to the media_wysiwyg module. Install the media module 7.x-2.x and enable included media_wysiwyg module. After completing these steps, enable the media plugin in CKEditor profiles again.', array('@profiles' => implode(', ', $profiles_using_media), '!media' => 'media')); + } } /** diff --git a/plugins/mediaembed/plugin.js b/plugins/mediaembed/plugin.js index e617008..7e93dc3 100644 --- a/plugins/mediaembed/plugin.js +++ b/plugins/mediaembed/plugin.js @@ -4,7 +4,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ /** - * @file Plugin for inserting Drupal embeded media + * @file Plugin for inserting embeded media */ ( function() { var numberRegex = /^\d+(?:\.\d+)?$/;