function _ocupload_templates_save_template in One Click Upload 7.2
Same name and namespace in other branches
- 7 ocupload.features.inc \_ocupload_templates_save_template()
Saves a profile field to the database.
Parameters
array $field_data: The field data to save.
1 call to _ocupload_templates_save_template()
- ocupload_templates_features_revert in ./
ocupload.features.inc - Implements hook_features_revert().
File
- ./
ocupload.features.inc, line 62
Code
function _ocupload_templates_save_template($template) {
if (!db_query("SELECT * FROM {ocupload_templates} WHERE mask = :mask", array(
':mask' => $template['mask'],
))
->fetchObject()) {
drupal_write_record('ocupload_templates', $template);
}
else {
drupal_write_record('ocupload_templates', $template, array(
'mask',
));
}
}