Mercurial > defr > drupal > og_statistics
comparison og_statistics.module @ 1:0aae3e2e6309
Fix d'un warning dans le cas node_load(node_save());
author | Franck Deroche <franck@defr.org> |
---|---|
date | Tue, 24 Nov 2009 14:26:41 +0100 |
parents | 9ce879ecbce6 |
children | 13824d66b299 |
comparison
equal
deleted
inserted
replaced
0:9ce879ecbce6 | 1:0aae3e2e6309 |
---|---|
79 } | 79 } |
80 break; | 80 break; |
81 case 'update': | 81 case 'update': |
82 // Update statistics. | 82 // Update statistics. |
83 if (og_is_group_post_type($node->type)) { | 83 if (og_is_group_post_type($node->type)) { |
84 if (isset($node->og_groups)) { | 84 if (isset($node->og_groups) && isset($node->og_initial_groups)) { |
85 $updated_gid = array_intersect($node->og_groups, $node->og_initial_groups); | 85 $updated_gid = array_intersect($node->og_groups, $node->og_initial_groups); |
86 $added_gid = array_diff($node->og_groups, $node->og_initial_groups); | 86 $added_gid = array_diff($node->og_groups, $node->og_initial_groups); |
87 $removed_gid = array_diff($node->og_initial_groups, $node->og_groups); | 87 $removed_gid = array_diff($node->og_initial_groups, $node->og_groups); |
88 foreach ($updated_gid as $gid) { | 88 foreach ($updated_gid as $gid) { |
89 og_statistics_update_last_node($node->changed, $gid); | 89 og_statistics_update_last_node($node->changed, $gid); |