You are here

function clock_update in Clock 7.2

Updates a clock.

Parameters

$cid: The clock ID.

$clock: A clock object as returned by clock_info() with new settings.

2 calls to clock_update()
clock_block_save in ./clock.module
Implements hook_block_save().
clock_edit_form_submit in ./clock.admin.inc
Form submission handler for clock_edit_form().
1 string reference to 'clock_update'
clock_update_7101 in ./clock.install
Install the clock_settings table and remove legacy variables.

File

./clock.module, line 419
Display clocks on your site.

Code

function clock_update($cid, $clock) {
  $info = array(
    'cid' => $cid,
    'time_zone_type' => $clock->time_zone_type,
    'custom_time_zone' => $clock->custom_time_zone,
    'date_type' => $clock->date_type,
    'display' => $clock->display,
    'weight' => $clock->weight,
  );
  drupal_write_record('clock_settings', $info, 'cid');
}