function ad_get_advertisement in Advertisement 7.3
Load an Ad node from the cache.
This function is safe to call from a bootstrap phase lower than full, as it will perform a full bootstrap if needed.
Parameters
int $nid: The ad node id.
bool $cache: (optional) Whether to use the cache, if possible. Defaults to TRUE.
Return value
array The ad node, turned into an array.
File
- ./
ad.module, line 280 - Core code for the ad module.
Code
function ad_get_advertisement($nid, $cache = TRUE) {
if (!$cache) {
return node_load($nid);
}
else {
return ad_get_cache('ad_get_advertisement', array(
$nid,
FALSE,
));
}
}