function bueditor_buttons_update in BUEditor 6
Update button contents
1 call to bueditor_buttons_update()
- bueditor_update_6000 in ./
bueditor.install - 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…
File
- ./
bueditor.install, line 163
Code
function bueditor_buttons_update() {
$result = db_query("SELECT bid, content FROM {bueditor_buttons} WHERE content LIKE '%%%s%%' OR content LIKE '%%%s%%' OR content LIKE '%%%s%%'", 'editor.', 'imce', 'eDefSelP');
$tr = array(
'editor.' => 'BUE.',
"user_access('access imce')" => 'imce_access()',
'imce/browse' => 'imce',
'eDefSelProcessLines' => 'eDefTagLines',
);
while ($button = db_fetch_object($result)) {
$button->content = strtr($button->content, $tr);
db_query("UPDATE {bueditor_buttons} SET content = '%s' WHERE bid = %d", $button->content, $button->bid);
}
}