You are here

function _signup_event_autoclose_sql in Signup 5.2

Same name in this branch
  1. 5.2 includes/event.5x-1.inc \_signup_event_autoclose_sql()
  2. 5.2 includes/event.5x-2.inc \_signup_event_autoclose_sql()
Same name and namespace in other branches
  1. 6.2 includes/event.6x-2.inc \_signup_event_autoclose_sql()
  2. 6 includes/event.6x-2.inc \_signup_event_autoclose_sql()
  3. 7 includes/event.6x-2.inc \_signup_event_autoclose_sql()

Return value

Array of SQL clauses for cron auto-close query builder.

1 call to _signup_event_autoclose_sql()
signup_autoclose_sql in includes/scheduler.inc

File

includes/event.5x-1.inc, line 31
Code required to support version 5.x-1.* of the event module.

Code

function _signup_event_autoclose_sql($content_type) {

  // We must manually include this here as the event module doesn't
  // include timezone support on all page requests.
  require_once drupal_get_path('module', 'event') . '/event_timezones.inc';
  return array(
    'fields' => array(
      'e.event_start',
      'e.timezone',
    ),
    'joins' => array(
      'INNER JOIN {event} e ON e.nid = s.nid',
    ),
    'where' => array(
      '(' . time() . ' > (e.event_start - ' . variable_get('signup_close_early', 1) * 3600 . '))',
    ),
  );
}