diff --git a/scheduler.module b/scheduler.module index 48b22d1..60bd9fd 100644 --- a/scheduler.module +++ b/scheduler.module @@ -739,6 +739,10 @@ function _scheduler_publish() { $n->revision = TRUE; $n->log = "Node published by scheduler module. Original creation date was ". format_date($old_creation_date, 'custom', $date_format) ."."; } + $n->publish_on = NULL; + + // Invoke scheduler API. + _scheduler_scheduler_api($n, 'pre_publish'); // Use the actions system to publish the node. watchdog('scheduler', '@type: scheduled publishing of %title.', array('@type' => $n->type, '%title' => $n->title), WATCHDOG_NOTICE, l(t('view'), 'node/'. $n->nid)); @@ -807,6 +811,10 @@ function _scheduler_unpublish() { $n->revision = TRUE; $n->log = "Node unpublished by scheduler module. Original change date was ". format_date($old_change_date, 'custom', $date_format) ."."; } + $n->unpublish_on = NULL; + + // Invoke scheduler API. + _scheduler_scheduler_api($n, 'pre_unpublish'); // Use the actions system to unpublish the node. watchdog('scheduler', '@type: scheduled unpublishing of %title.', array('@type' => $n->type, '%title' => $n->title), WATCHDOG_NOTICE, l(t('view'), 'node/'. $n->nid));