You are here

function signup_open_signup in Signup 6.2

Same name and namespace in other branches
  1. 5.2 signup.module \signup_open_signup()
  2. 5 signup.module \signup_open_signup()
  3. 6 signup.module \signup_open_signup()
  4. 7 signup.module \signup_open_signup()

Callback function for reopening signups

2 calls to signup_open_signup()
signup_node_admin_summary_form_submit in includes/node_admin_summary.inc
_signup_check_limit in ./signup.module
Checks the signup limit for a given node, and sees if a change in either the limit or total # of signups should result in a change in signup status (open vs. closed) and prints a message indicating what happened.

File

./signup.module, line 1145
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function signup_open_signup($nid, $cron = 'no') {
  db_query("UPDATE {signup} SET status = 1 WHERE nid = %d", $nid);
  if ($cron == 'no') {
    $node = node_load($nid);
    foreach (module_implements('signup_open') as $module) {
      $function = $module . '_signup_open';
      $function($node);
    }
    watchdog('signup', 'Signups reopened for %title.', array(
      '%title' => $node->title,
    ), WATCHDOG_NOTICE, l(t('view'), 'node/' . $nid));
  }
}