| 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 |
| 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) { |
| 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 |
} |
} |