/[drupal]/contributions/modules/node_invite/node_invite.send.inc
ViewVC logotype

Diff of /contributions/modules/node_invite/node_invite.send.inc

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

revision 1.4.2.4, Fri Sep 4 08:40:49 2009 UTC revision 1.4.2.5, Fri Sep 18 15:56:22 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node_invite.send.inc,v 1.4.2.3 2009/09/03 00:17:30 hadsie Exp $  // $Id: node_invite.send.inc,v 1.4.2. hadsie Exp $
3  /**  /**
4   * @file   * @file
5   * Provides the invite sending form.   * Provides the invite sending form.
# Line 59  function node_invite_send($form_state, $ Line 59  function node_invite_send($form_state, $
59    $form['submit'] = array(    $form['submit'] = array(
60      '#type' => 'submit',      '#type' => 'submit',
61      '#value' => t('Submit'),      '#value' => t('Submit'),
62        '#weight' => 20,
63    );    );
64    
65    return $form;    return $form;
# Line 127  function node_invite_send_submit($form, Line 128  function node_invite_send_submit($form,
128    
129        // 3. store a record in {node_invites} and get insert_id        // 3. store a record in {node_invites} and get insert_id
130        // (which we use to build the message)        // (which we use to build the message)
131          $account = user_load(array('mail' => $recip_email));
132        $params = array(        $params = array(
133            'nid' => $node->nid,            'nid' => $node->nid,
134            'email_invitee' => $email,            'email_invitee' => $recip_email,
135              'name_invitee' => $recip_name,
136              'uid_invitee' => $account ? $account->uid : 0,
137            'uid_inviter' => $user->uid,            'uid_inviter' => $user->uid,
138            'status' => 'NEW',            'status' => 'NEW',
139        );        );
140        $invite = node_invite_save('', $params);        $invite = node_invite_save('', $params);
141    
       /*  
       $sent = time();  
       $hash = md5($email . $sent);  
       db_query("INSERT INTO {node_invites} (nid, email_invitee, uid_inviter, status, sent, hash) VALUES (%d, '%s', %d, '%s', %d, '%s')", $node->nid, $email, $user->uid, 'NEW', $sent, $hash);  
       $insert_id = db_last_insert_id('node_invites', 'iid');  
       */  
   
142        // 3.5 we need to send the invite stuff to token_replace (so it can drp in names, etc.        // 3.5 we need to send the invite stuff to token_replace (so it can drp in names, etc.
143        // this also over-rides the old (and right) way of doing this where we pulled inviter-name/mail from global $user        // this also over-rides the old (and right) way of doing this where we pulled inviter-name/mail from global $user
144        $node->invite_specific_info = array(        $node->invite_specific_info = array(

Legend:
Removed from v.1.4.2.4  
changed lines
  Added in v.1.4.2.5

  ViewVC Help
Powered by ViewVC 1.1.2