--- modr8_admin.inc.dist 2009-02-04 18:28:10.000000000 -0700 +++ modr8_admin.inc 2009-02-12 10:22:32.000000000 -0700 @@ -348,6 +348,24 @@ } db_query('UPDATE {node} SET moderate = 0 '. $publish .' WHERE nid = %d', $nid); drupal_set_message(t('The %type with title %title has been approved.', array('%title' => $values['title'], '%type' => $values['type']))); + + /* Trigger a Subscriptions email when items are approved. */ + /* Create event item to send to the subscriptions_queue. */ + if ( module_exists(subscriptions) ) { + $node = node_load($nid, NULL, TRUE); + $event = array('module' => 'node', + 'load_function' => 'subscriptions_content_node_load', + 'load_args' => $nid, + 'nid' => $nid, + 'is_new' => True, + 'type' => 'node', + 'uid' => $values['author_uid'], + 'node' => $node + ); + subscriptions_queue($event); + } + /* end modification */ + cache_clear_all(); modr8_log_action('approve', $nid, $values, $message); break;