You are here

function imagepicker_get_images_by_group in Image Picker 5.2

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

File

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

Code

function imagepicker_get_images_by_group($gid) {
  $result = db_query("SELECT img_id FROM {imagepicker_group_images} WHERE gid = %d", array(
    $gid,
  ));
  $ct = 0;
  while ($row = db_fetch_array($result)) {
    $data[] = $row['img_id'];
    $ct++;
  }
  if ($ct) {
    return $data;
  }
  return FALSE;
}