function ad_image_active_file in Advertisement 7
Same name and namespace in other branches
- 5.2 image/ad_image.module \ad_image_active_file()
- 5 image/ad_image.module \ad_image_active_file()
- 6.3 image/ad_image.module \ad_image_active_file()
- 6 image/ad_image.module \ad_image_active_file()
- 6.2 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 - Implementation of hook_adapi().
File
- image/
ad_image.module, line 366 - 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 && !isset($data->remove)) {
return $fid;
}
}
}
}
return 0;
}