function _textimage_preset_flush in Textimage 5
Same name and namespace in other branches
- 5.2 textimage_admin.inc \_textimage_preset_flush()
- 6.2 textimage_admin.inc \_textimage_preset_flush()
- 7.2 textimage.admin.inc \_textimage_preset_flush()
flush cached media for a preset.
Parameters
id: a preset id.
3 calls to _textimage_preset_flush()
- textimage_preset_flush_confirm_submit in ./
textimage.module - _textimage_preset_delete in ./
textimage.module - _textimage_preset_update in ./
textimage.module - update a preset
File
- ./
textimage.module, line 1123
Code
function _textimage_preset_flush($id) {
drupal_set_message(t('Flushed Preset Images (ID: @id)', array(
'@id' => $id,
)));
$preset = _textimage_preset_load($id);
$presetdir = realpath(file_directory_path() . '/textimage/' . $preset['name']);
if (is_dir($presetdir)) {
_textimage_recursive_delete($presetdir);
@unlink($presetdir);
}
}