Mercurial > defr > drupal > ad
diff channel/ad_channel.module @ 4:0d1c70d51fbe ad
maj premiere release officielle 2 module advertisement
author | sly |
---|---|
date | Mon, 27 Apr 2009 10:27:29 +0000 |
parents | e5584a19768b |
children | 6aeff3329e01 |
line wrap: on
line diff
--- a/channel/ad_channel.module Mon Apr 20 09:49:37 2009 +0000 +++ b/channel/ad_channel.module Mon Apr 27 10:27:29 2009 +0000 @@ -1,5 +1,5 @@ <?php -// $Id: ad_channel.module,v 1.1.4.20 2009/04/09 22:04:49 jeremy Exp $ +// $Id: ad_channel.module,v 1.1.4.21 2009/04/22 15:14:46 jeremy Exp $ /** * @file @@ -449,12 +449,11 @@ return _ad_channel_load_node($node); case 'insert': case 'update': - // Fully load the node object to confirm that we are working with an - // advertisement. - $ad = node_load($node->nid); - if (isset($ad->adtype)) { + if (is_object($node) && isset($node->adtype) && + isset($node->probability) && isset($node->nid)) { return _ad_channel_save_node($node); } + break; case 'delete': return _ad_channel_delete_node($node); case 'validate':