function clock_block_save in Clock 7.2
Same name and namespace in other branches
- 7 clock.module \clock_block_save()
Implements hook_block_save().
File
- ./
clock.module, line 119 - Display clocks on your site.
Code
function clock_block_save($delta = '', $edit = array()) {
if ($delta == 'clock') {
foreach ($edit['clocks'] as $cid => $values) {
$old_clock = clock_info($cid);
$clock = new StdClass();
$clock->time_zone_type = $old_clock->time_zone_type;
$clock->custom_time_zone = $old_clock->custom_time_zone;
$clock->date_type = $old_clock->date_type;
$clock->display = $old_clock->display;
$clock->weight = $values['weight'];
clock_update($cid, $clock);
}
}
}