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

Diff of /contributions/modules/node_invite/node_invite.module

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

revision 1.11.2.5, Fri Sep 18 15:56:22 2009 UTC revision 1.11.2.6, Wed Oct 14 14:47:35 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node_invite.module,v 1.11.2.4 2009/09/04 08:40:48 hadsie Exp $  // $Id: node_invite.module,v 1.11.2.5 2009/09/18 15:56:22 hadsie Exp $
3  /**  /**
4   * @file   * @file
5   * Provides the overall functionality for the node_invite module.   * Provides the overall functionality for the node_invite module.
# Line 176  function node_invite_load($invite_id, $r Line 176  function node_invite_load($invite_id, $r
176  function node_invite_link($type, $node = NULL, $teaser = FALSE) {  function node_invite_link($type, $node = NULL, $teaser = FALSE) {
177    global $user;    global $user;
178    $links = array();    $links = array();
179    
180    if ($type == 'node' && _node_invite_type_is_allowed($node->type) && user_access('invite users to invite-enabled nodes') && _ni_node_is_enabled($node->nid)) {    if ($type == 'node' && _node_invite_type_is_allowed($node->type) && user_access('invite users to invite-enabled nodes') && _ni_node_is_enabled($node->nid)) {
181      $links['node_invite'] = array(      $links['node_invite'] = array(
182        'title' => t('Invite people to this @type', array('@type' => $node->type)),        'title' => t('Invite people to this @type', array('@type' => $node->type)),
# Line 429  function node_invite_nodeapi(&$node, $op Line 429  function node_invite_nodeapi(&$node, $op
429    }    }
430    elseif ($op == 'update' || $op == 'insert') {    elseif ($op == 'update' || $op == 'insert') {
431      if (!isset($node->node_invites_enabled)) {      if (!isset($node->node_invites_enabled)) {
       drupal_set_message("had to get defaults for node->node_invites_enabled");  
432        $node->node_invites_enabled = _ni_node_is_enabled($node->nid);        $node->node_invites_enabled = _ni_node_is_enabled($node->nid);
433      }      }
434    
# Line 521  function node_invite_rsvp_path($invite) Line 520  function node_invite_rsvp_path($invite)
520    else {    else {
521      $url .= $invite->iid;      $url .= $invite->iid;
522    }    }
523    
524    return $url;    return $url;
525  }  }
526    

Legend:
Removed from v.1.11.2.5  
changed lines
  Added in v.1.11.2.6

  ViewVC Help
Powered by ViewVC 1.1.2