Removing date_field_get_sql_handler() from Date has broken signup-7.x-1.x-dev.

In signup/includes/date.inc the API is used by:

function _signup_date_reminder_sql($content_type) {
  // Get the date field information for this content type.
  $field = signup_date_field($content_type);
  $start_field = $field['field_name'] . '_value';

  // Figure out what TZ we want to do the date comparisons in.
  $compare_tz = $field['settings']['tz_handling'] == 'none' ? date_default_timezone() : 'UTC';
  // Get a DateAPI SQL handler class for this field.
  $handler = date_field_get_sql_handler($field, $compare_tz);

  // Find the current time in the appropriate TZ for this field.
  $now_date = date_now($compare_tz);
  // Need to enclose this in ' marks to use directly in the SQL.
  $now = "'" . date_format($now_date, DATE_FORMAT_DATETIME) . "'";

  // Extract the correct SQL to represent the start time.
  $start_time = $handler->sql_field($start_field);
...

Comments

jeffersonjhunt’s picture

So I found that this function is in date.module and not date.api. I'll work on a patch to signup as I assume its bad form for them to have used a private function in their code.

Any tips on how I should replace the function used by signup would be greatly appreciated.

jeffersonjhunt’s picture

Lowell’s picture

subscribing

greenwork’s picture

Thanks for helping on this since its causing my cron to break making updates difficult. Disabling signup worked for the time being.

karens’s picture

Status: Active » Fixed

Signup module can do the same thing in their own code. I'm adding it back temporarily and marking it deprecated until Signup can do something else.

http://drupalcode.org/project/date.git/commit/99ffc01

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.