Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
Set unpublish time when importing events.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikl committed Sep 26, 2012
1 parent 4802353 commit 120eb19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kdb_feed_import/event.inc
Expand Up @@ -243,6 +243,9 @@ class KDBEventFeedImport extends KDBFeedImportBase {
$node->field_datetime[0]['value2'] = $enddate->format('Y-m-d H:i:s');
$node->field_datetime[0]['timezone'] = $startdate->getTimezone()->getName();

// Set the unpublish-time to the the end time for the event plus two hours.
$node->unpublish_on = $enddate->getTimestamp() + 7200;

// Save files.
$node->field_list_image = array();
foreach ($row->images as $image_url) {
Expand Down

0 comments on commit 120eb19

Please sign in to comment.