function ckeditor_update_7000 in CKEditor - WYSIWYG HTML editor 7
Updates broken settings for the 'Full' profile. (Resets toolbar to default)
File
- ./
ckeditor.install, line 423
Code
function ckeditor_update_7000() {
_ckeditor_d6_to_d7_migration();
$result = db_query("SELECT settings FROM {ckeditor_settings} WHERE name = :name", array(
':name' => 'Full',
))
->fetchField();
$settings = unserialize($result);
$settings['toolbar'] = "\n[\n ['Source'],\n ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],\n ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],\n ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],\n '/',\n ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],\n ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],\n ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],\n ['Link','Unlink','Anchor'],\n ['DrupalBreak'],\n '/',\n ['Format','Font','FontSize'],\n ['TextColor','BGColor'],\n ['Maximize', 'ShowBlocks']\n]\n ";
$settings = serialize($settings);
$update = db_update('ckeditor_settings')
->fields(array(
'settings' => $settings,
))
->condition('name', 'Full', '=')
->execute();
}