/[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.70.2.6, Mon May 7 12:19:11 2007 UTC revision 1.70.2.7, Sun Aug 5 12:36:18 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: og2list.module,v 1.70.2.5 2007/01/05 22:43:32 killes Exp $  // $Id: og2list.module,v 1.70.2.6 2007/05/07 12:19:11 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 372  function og2list_nodeapi(&$node, $op, $a Line 372  function og2list_nodeapi(&$node, $op, $a
372        }        }
373        break;        break;
374      case 'update':      case 'update':
375          // If the node previously did not have an address and one has just been assigned,
376          // then we need to set it now.  If the node did have an og2list_groups row before
377          // then the recipient wasn't set and we update it.  For now you still cannot change
378          // a recipient once it's set.
379          //
380          if ($node->recipient && (db_num_rows(db_query("SELECT recipient FROM {og2list_groups} WHERE nid = %d", $node->nid)) == 0)) {
381            db_query("INSERT INTO {og2list_groups} (nid, recipient, status) VALUES(%d, '%s', 1)", $node->nid, $node->recipient);
382          }
383    
384        if ($node->status == 1) {        if ($node->status == 1) {
385          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);
386        }        }

Legend:
Removed from v.1.70.2.6  
changed lines
  Added in v.1.70.2.7

  ViewVC Help
Powered by ViewVC 1.1.2