You are here

function availability_calendar_update_calendar in Availability Calendars 7.3

Same name and namespace in other branches
  1. 7.5 availability_calendar.inc \availability_calendar_update_calendar()
  2. 7.4 availability_calendar.inc \availability_calendar_update_calendar()

Updates the changed field of a calendar.

Parameters

int $cid: The calendar id.

2 calls to availability_calendar_update_calendar()
availability_calendar_update_availability in ./availability_calendar.inc
Sets the given date range to the given state for the given calendar.
availability_calendar_update_multiple_availability in ./availability_calendar.inc
Updates/inserts the states for the given ranges.

File

./availability_calendar.inc, line 378
General helper methods for Availability Calendar

Code

function availability_calendar_update_calendar($cid) {
  $now = time();
  $cid = db_update('availability_calendar_calendar')
    ->fields(array(
    'changed' => $now,
  ))
    ->condition('cid', $cid, '=')
    ->execute();
  return (int) $cid;
}