function _mobile_codes_presets_flush in Mobile Codes 5
Same name and namespace in other branches
- 6 mobile_codes.admin.inc \_mobile_codes_presets_flush()
2 calls to _mobile_codes_presets_flush()
File
- ./
mobile_codes.admin.inc, line 287
Code
function _mobile_codes_presets_flush($pid) {
if (variable_get('mobile_codes_flush', 1) == 1) {
drupal_set_message(t('Flushed Preset Images (ID: @pid)', array(
'@pid' => $pid,
)));
$dir = realpath(file_directory_path() . '/mobile_codes/' . $pid);
if (is_dir($dir)) {
_mobile_codes_recursive_delete($dir);
}
db_query('DELETE FROM {mobile_codes} where pid = %d', $pid);
}
}