function bueditor_delete_editor in BUEditor 6.2
Same name and namespace in other branches
- 6 bueditor.admin.inc \bueditor_delete_editor()
- 7 admin/bueditor.admin.inc \bueditor_delete_editor()
Delete an editor.
1 call to bueditor_delete_editor()
- bueditor_delete_form_submit in admin/
bueditor.admin.inc - Editor delete form submission.
File
- admin/
bueditor.admin.inc, line 515
Code
function bueditor_delete_editor($eid) {
db_query("DELETE FROM {bueditor_buttons} WHERE eid = %d", $eid);
db_query("DELETE FROM {bueditor_editors} WHERE eid = %d", $eid);
//update roles
$roles = variable_get('bueditor_roles', array());
foreach ($roles as $rid => $role) {
$roles[$rid]['editor'] = $eid == $role['editor'] ? 0 : $role['editor'];
$roles[$rid]['alt'] = $eid == $role['alt'] ? 0 : $role['alt'];
}
variable_set('bueditor_roles', $roles);
}