--- modr8_admin.inc.dist 2009-02-04 18:28:10.000000000 -0700 +++ modr8_admin.inc 2009-02-05 16:46:19.000000000 -0700 @@ -348,6 +348,27 @@ } 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']))); + + /* Modified by Jeff Rice 02/05/2009 to trigger a subscriptions email when items are approved. */ + /* Create event item to send to the subscriptions_queue */ + + if ( module_exists(subscriptions) ) { + $node = &new stdClass(); + $node->type = strtolower($values['type']); + $node->uid = $values['author_uid']; + $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_modr8_interface('approve', $event); + } + /* end modification */ + cache_clear_all(); modr8_log_action('approve', $nid, $values, $message); break;