You are here

function signup_close_signup in Signup 5

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

Callback function for closing signups

3 calls to signup_close_signup()
signup_close_signups_form_submit in ./signup.module
signup_close_signup_admin in ./signup.module
Callback function for opening signups via a link in the admin tables
signup_cron in ./signup.module
Implementation of hook_cron().

File

./signup.module, line 844

Code

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