53,54d52 < $curtime = time(); < $closing_time = $curtime + (variable_get('signup_close_early', 1) * 3600); 65c63 < --- > $curtime = time(); 111c109 < --- > $closing_time = $curtime + (variable_get('signup_close_early', 1) * 3600); 125,159d122 < else if(module_exists('date')) { < /* < * 1.) Get content fields < * 2.) loop through content fields < * 3.) if date field < * 4.) get table < * 5.) Grab each event, create subject etc and grab the users < * 6.) compose message < * 7.) do closing time < */ < $fields = content_fields(); < foreach($fields as $field) { < if ($field['type'] == 'date' || $field['type'] == 'datestamp') { < $db_info = content_database_info($field); < $table = $db_info['table']; < $column = $db_info['columns']['value']['column']; < < // closing of signup nodes < $closing_time = $curtime + (variable_get('signup_close_early', 1) * 3600); < $result = db_query("SELECT s.nid FROM {signup} s INNER JOIN {". $table . "} e ON e.nid = s.nid WHERE s.status = 1 AND e." . $column . " < %d", $closing_time); < // Loop through the results, calling the event closing function. < while ($signup = db_fetch_object($result)) { < signup_close_signup($signup->nid, $cron = 'yes'); < < $node = node_load($signup->nid); < foreach (module_implements('signup_close') as $module) { < $function = $module .'_signup_close'; < $function($node); < } < watchdog('signup', t('Signups closed for %event by cron.', array('%event' => $node->title)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); < } < < } < } < }