function bueditor_update_6000 in BUEditor 6
Same name and namespace in other branches
- 6.2 bueditor.install \bueditor_update_6000()
Update from 4|5.x to 6.x Add new fields: {bueditor_editors}.iconpath, {bueditor_editors}.librarypath. Change {bueditor_buttons}.accesskey field type from char to varchar. Update {bueditor_buttons}.content field values. Insert the latest version of default editor. Delete needless cron variable.
File
- ./
bueditor.install, line 180
Code
function bueditor_update_6000() {
$ret = array();
$iconpath = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '%BUEDITOR/icons',
);
$librarypath = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '%BUEDITOR/library',
);
$accesskey = array(
'type' => 'varchar',
'length' => 1,
'not null' => TRUE,
'default' => '',
);
db_add_field($ret, 'bueditor_editors', 'iconpath', $iconpath);
db_add_field($ret, 'bueditor_editors', 'librarypath', $librarypath);
db_change_field($ret, 'bueditor_buttons', 'accesskey', 'accesskey', $accesskey);
bueditor_buttons_update();
bueditor_insert_latest('default 6.x');
variable_del('bueditor_cron_last');
return $ret;
}