You are here

function ad_image_format_load in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 image/ad_image.module \ad_image_format_load()
  2. 5 image/ad_image.module \ad_image_format_load()
  3. 6 image/ad_image.module \ad_image_format_load()
  4. 6.2 image/ad_image.module \ad_image_format_load()
  5. 7 image/ad_image.module \ad_image_format_load()

Loads image format object from DB.

1 call to ad_image_format_load()
ad_image_validate_size in image/ad_image.module
Validate that the size of the uploaded image is within the defined limits.

File

image/ad_image.module, line 386
Enhances the ad module to support banner ads.

Code

function ad_image_format_load($gid) {
  static $format;
  if (isset($format[$gid])) {
    return $format[$gid];
  }
  $format[$gid] = db_fetch_object(db_query('SELECT min_width, max_width, min_height, max_height, max_size FROM {ad_image_format} WHERE gid = %d', $gid));
  return $format[$gid];
}