You are here

function imagepicker_insert_group_image in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_insert_group_image()
  2. 6.2 imagepicker.functions.inc \imagepicker_insert_group_image()
  3. 7 imagepicker.functions.inc \imagepicker_insert_group_image()
1 call to imagepicker_insert_group_image()
imagepicker_group_images_form_submit in ./imagepicker.module
Submit form

File

./imagepicker.module, line 1659
Enables permitted roles to upload images for insertion into configured nodes.

Code

function imagepicker_insert_group_image($record) {
  if (!db_query("INSERT INTO {imagepicker_group_images} (gid, img_id) VALUES (%d, %d)", array(
    $record['gid'],
    $record['img_id'],
  ))) {
    drupal_set_message(t('Error while trying to insert your group.'), 'error');
  }
}