You are here

function ad_image_active_file in Advertisement 5.2

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

Determine the currently active ad.

1 call to ad_image_active_file()
ad_image_adapi in image/ad_image.module
Adapi implementation.

File

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

Code

function ad_image_active_file($files = array()) {
  if (is_array($files)) {
    foreach ($files as $fid => $data) {
      if (is_array($data)) {
        if ($data['list'] && !$data['remove']) {
          return $fid;
        }
      }
      else {
        if ($data->list && !$data->remove) {
          return $fid;
        }
      }
    }
  }
  return 0;
}