function bueditor_write_editor in BUEditor 6.2
Same name and namespace in other branches
- 7 admin/bueditor.admin.inc \bueditor_write_editor()
Update/insert an editor.
4 calls to bueditor_write_editor()
- bueditor_editor_submit in admin/
bueditor.admin.inc - Editor form submission.
- bueditor_eop_copy in admin/
bueditor.admin.inc - Editor copy operation.
- bueditor_save_import in admin/
bueditor.admin.inc - Save imported editor data. Save icons and library files into specified editor path.
- bueditor_selaction_submit in admin/
bueditor.admin.inc - Selected buttons actions form submission.
File
- admin/
bueditor.admin.inc, line 809
Code
function bueditor_write_editor($editor, $buttons = array()) {
if (isset($editor->spriteon) && $editor->spriteon) {
include_once './' . drupal_get_path('module', 'bueditor') . '/admin/bueditor.sprite.inc';
$editor->spritename = bueditor_sprite($editor, $buttons);
}
if (drupal_write_record('bueditor_editors', $editor, bueditor_isupdate($editor, 'eid'))) {
foreach ($buttons as $button) {
$button->eid = $editor->eid;
drupal_write_record('bueditor_buttons', $button, bueditor_isupdate($button, 'bid'));
}
return $editor;
}
return FALSE;
}