You are here

function _textimage_preset_update in Textimage 7.2

Same name and namespace in other branches
  1. 5.2 textimage_admin.inc \_textimage_preset_update()
  2. 5 textimage.module \_textimage_preset_update()
  3. 6.2 textimage_admin.inc \_textimage_preset_update()

Update a preset.

Parameters

int $id: preset id

string $name: new name for the preset

string $description: description

string $settings: settings

1 call to _textimage_preset_update()
textimage_preset_edit_submit in ./textimage.admin.inc
Todo.

File

./textimage.admin.inc, line 626
Textimage admin page callback

Code

function _textimage_preset_update($id, $name, $description, $settings) {
  $name = check_plain($name);
  $result = db_update('textimage_preset')
    ->fields(array(
    'name' => $name,
    'description' => $description,
    'settings' => serialize($settings),
  ))
    ->condition('pid', $id)
    ->execute();
  _textimage_preset_flush($id);
  return $result;
}