/[drupal]/contributions/modules/og2list/og2list.module
ViewVC logotype

Diff of /contributions/modules/og2list/og2list.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.108, Sun Aug 5 12:30:19 2007 UTC revision 1.109, Sun Aug 5 12:35:31 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: og2list.module,v 1.107 2007/08/05 12:27:09 killes Exp $  // $Id: og2list.module,v 1.108 2007/08/05 12:30:19 killes Exp $
3    
4  // Defines for outgoing mail  // Defines for outgoing mail
5  define('OG2LIST_OUTGOING_NOT_SENT', 1);  define('OG2LIST_OUTGOING_NOT_SENT', 1);
# Line 378  function og2list_nodeapi(&$node, $op, $a Line 378  function og2list_nodeapi(&$node, $op, $a
378        }        }
379        break;        break;
380      case 'update':      case 'update':
381          // If the node previously did not have an address and one has just been assigned,
382          // then we need to set it now.  If the node did have an og2list_groups row before
383          // then the recipient wasn't set and we update it.  For now you still cannot change
384          // a recipient once it's set.
385          //
386          if ($node->recipient && (db_num_rows(db_query("SELECT recipient FROM {og2list_groups} WHERE nid = %d", $node->nid)) == 0)) {
387            db_query("INSERT INTO {og2list_groups} (nid, recipient, status) VALUES(%d, '%s', 1)", $node->nid, $node->recipient);
388          }
389    
390        if ($node->status == 1) {        if ($node->status == 1) {
391          db_query('UPDATE {og2list_outgoing_arguments} a INNER JOIN {og2list_outgoing_content} c ON a.mid = c.mid SET a.status = %d WHERE c.is_node = 1 AND c.id = %d AND a.status = %d', OG2LIST_OUTGOING_NOT_SENT, $node->nid, OG2LIST_OUTGOING_MODERATED);          db_query('UPDATE {og2list_outgoing_arguments} a INNER JOIN {og2list_outgoing_content} c ON a.mid = c.mid SET a.status = %d WHERE c.is_node = 1 AND c.id = %d AND a.status = %d', OG2LIST_OUTGOING_NOT_SENT, $node->nid, OG2LIST_OUTGOING_MODERATED);
392        }        }

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

  ViewVC Help
Powered by ViewVC 1.1.2