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

Diff of /contributions/modules/notify_by_views/notify_by_views.module

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

revision 1.10, Tue Apr 28 18:29:54 2009 UTC revision 1.11, Tue Apr 28 18:40:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: notify_by_views.module,v 1.9 2009/04/28 18:27:00 matt2000 Exp $ */  /* $Id: notify_by_views.module,v 1.10 2009/04/28 18:29:54 matt2000 Exp $ */
3  /**  /**
4   * Display help and module information   * Display help and module information
5   * @param section which section of the site we're displaying help   * @param section which section of the site we're displaying help
# Line 19  function notify_by_views_help($section=' Line 19  function notify_by_views_help($section='
19  }  }
20    
21  /**  /**
22     * Implementation of hook_perm().
23     */
24    function notify_by_views_perm() {
25      return array('alert of immediate sends');
26    }
27    
28    /**
29   * Implementation of hook_user().   * Implementation of hook_user().
30   */   */
31  function notify_by_views_user($op, &$edit, &$user, $category = NULL) {  function notify_by_views_user($op, &$edit, &$user, $category = NULL) {
# Line 232  function notify_by_views_nodeapi(&$node, Line 239  function notify_by_views_nodeapi(&$node,
239            $total = $total + $result[0];            $total = $total + $result[0];
240         }         }
241    
242          global $user;          if (user_access('alert of immediate sends')) {
         if ($user->uid == 1) {  
243            drupal_set_message($total .t(" user(s) immediately notified by email."));            drupal_set_message($total .t(" user(s) immediately notified by email."));
244          }          }
245    }    }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.2