function ocupload_template_save in One Click Upload 7
Same name and namespace in other branches
- 7.2 ocupload.inc \ocupload_template_save()
Add/save template
3 calls to ocupload_template_save()
- ocupload_form_template_submit in ./
ocupload.inc - Form submit
- ocupload_install in ./
ocupload.install - Implements hook_install().
- ocupload_update_7105 in ./
ocupload.install - Add new col {ocupload_templates}.link_template Update colorbox integration Delete col {ocupload_templates}.show_in_colorbox
File
- ./
ocupload.inc, line 447 - Service functions
Code
function ocupload_template_save(&$template, $multi = FALSE) {
if ($multi) {
return array_map('ocupload_template_save', $template);
}
$template_array = (array) $template;
return drupal_write_record('ocupload_templates', $template, !empty($template_array['tid']) ? 'tid' : array());
}