function signup_open_signup in Signup 7
Same name and namespace in other branches
- 5.2 signup.module \signup_open_signup()
- 5 signup.module \signup_open_signup()
- 6.2 signup.module \signup_open_signup()
- 6 signup.module \signup_open_signup()
Callback function for reopening signups.
Parameters
int $nid: The node ID of the node to which signups are being opened.
string $cron: A string indicating whether the callback is being executed by cron.
2 calls to signup_open_signup()
- signup_node_admin_summary_form_submit in includes/
node_admin_summary.inc - @todo Please document this function.
- _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 1258 - 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') {
// TODO Please review the conversion of this statement to the D7 database API syntax.
/* db_query("UPDATE {signup} SET status = 1 WHERE nid = %d", $nid) */
db_update('signup')
->fields(array(
'status' => 1,
))
->condition('nid', $nid)
->execute();
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));
}
}