You are here

function revisioning_scheduler_node_update in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_scheduler/revisioning_scheduler.module \revisioning_scheduler_node_update()

Implements hook_node_update().

This hook was chosen to invoke the scheduler because at this point vid has the new value.

1 call to revisioning_scheduler_node_update()
revisioning_scheduler_node_insert in revisioning_scheduler/revisioning_scheduler.module
Implements hook_node_insert().

File

revisioning_scheduler/revisioning_scheduler.module, line 309
Allows revisions to be published at specified dates and times.

Code

function revisioning_scheduler_node_update($node) {
  if (empty($node->publication_date)) {
    _revisioning_scheduler_unschedule($node->vid);
  }
  else {
    $datetime = explode(' ', $node->publication_date);
    _revisioning_scheduler_schedule_publication($datetime[0], $datetime[1], $node);
  }
}