You are here

function _datereminder_has_future_dates in Date Reminder 7

Same name and namespace in other branches
  1. 6.2 includes/datereminder_form.inc \_datereminder_has_future_dates()
  2. 6 includes/datereminder_form.inc \_datereminder_has_future_dates()

Check if this reminder has future dates.

Check if this node has reminders enabled, and if there are any occurrances of the date field in the future.

@todo Should this test the type enabled variable first?

Parameters

node $node: The node to query

2 calls to _datereminder_has_future_dates()
datereminder_allowed_access_node in ./datereminder.module
Check if this user can access reminders for this node.
_datereminder_form in includes/datereminder_form.inc
Build the user reminder form.

File

includes/datereminder_form.inc, line 457
Support for forms displaying or entering reminders.

Code

function _datereminder_has_future_dates($node) {
  module_load_include('inc', 'datereminder', 'includes/date');
  $type = $node->type;
  $dfname = variable_get("datereminder_datefield_{$type}", '');
  if ($dfname != '') {
    $dfcontent = $node->{$dfname};
    return _datereminder_get_next_occurance($dfcontent, 0) != NULL;
  }
  return FALSE;
}