reverted: --- b/feeds.install +++ a/feeds.install @@ -206,14 +206,6 @@ 'default' => '', 'description' => 'The hash of the source item.', ), - 'republish_when_exists' => array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'size' => 'tiny', - 'description' => 'Relevant for feed items that are automatically unpublished for not existing in the source feed anymore: value is 1 if needs to be republished when the feed item shows up again in the feed; value is 0 otherwise.', - ), ), 'primary key' => array('entity_type', 'entity_id'), 'indexes' => array( @@ -224,7 +216,6 @@ 'global_lookup_url' => array('entity_type', array('url', 128)), 'global_lookup_guid' => array('entity_type', array('guid', 128)), 'imported' => array('imported'), - 'republish_when_exists' => array('republish_when_exists'), ), ); $schema['feeds_push_subscriptions'] = array( @@ -690,20 +681,3 @@ DrupalQueue::get('feeds_importer_expire')->deleteQueue(); } - - -/** - * Adds republish_when_exists field to feeds_item table. - */ -function feeds_update_7210() { - $spec = array( - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'size' => 'tiny', - 'description' => 'Whether this feed item currently exists in the source feed; 0 means it exists, 1 means it does not.', - ); - db_add_field('feeds_item', 'republish_when_exists', $spec); - db_add_index('feeds_item', 'republish_when_exists', array('republish_when_exists')); -} diff -u b/includes/FeedsSource.inc b/includes/FeedsSource.inc --- b/includes/FeedsSource.inc +++ b/includes/FeedsSource.inc @@ -87,6 +87,7 @@ public $created; public $updated; public $deleted; + public $unpublished; public $skipped; public $failed; @@ -105,7 +106,6 @@ $this->updated = $this->deleted = $this->unpublished = - $this->republished = $this->skipped = $this->failed = 0; } diff -u b/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc --- b/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -201,17 +201,6 @@ if (isset($form['update_non_existent'])) { $form['update_non_existent']['#options'][FEEDS_UNPUBLISH_NON_EXISTENT] = t('Unpublish non-existent nodes'); } - - $form['republish_previously_non_existent'] = array( - '#type' => 'radios', - '#title' => t('Republish unpublished previously non-existent nodes'), - '#description' => t('Action to take when nodes that were previously unpublished for being non-existent, show up again in the feed.'), - '#options' => array( - 0 => t('Leave unpublished'), - 1 => t('Republish'), - ), - '#default_value' => $this->config['republish_previously_non_existent'], - ); return $form; } @@ -408,29 +397,8 @@ } - // Load feed item object into node. - $this->loadItemInfo($node); - // Setting this flag makes sure the item is republished when it shows - // up in the node again (as long as the - // 'republish_previously_non_existent' feeds setting is set). - $node->feeds_item->republish_when_exists = 1; node_unpublish_action($node); node_save($node); $state->unpublished++; } } } - - /** - * {@inheritdoc} - */ - protected function republishEntityIfNeeded(FeedsState $state, FeedsSource $source, $nid) { - $node = $this->entityLoad($source, $nid); - $this->loadItemInfo($node); - if ($node->status == 0 && $node->feeds_item->republish_when_exists == 1) { - // Republish the node - node_publish_action($node); - $this->entitySaveAccess($node); - $this->entitySave($node); - $state->republished++; - } - } } diff -u b/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc --- b/plugins/FeedsProcessor.inc +++ b/plugins/FeedsProcessor.inc @@ -201,9 +201,6 @@ } try { - if ($entity_id && $this->config['republish_previously_non_existent']) { - $this->republishEntityIfNeeded($state, $source, $entity_id); - } $hash = $this->hash($item); $changed = ($hash !== $this->getHash($entity_id)); @@ -316,16 +313,6 @@ ), ); } - if ($state->republished) { - $messages[] = array( - 'message' => format_plural( - $state->updated, - 'Republished @number @entity.', - 'Republished @number @entities.', - array('@number' => $state->republished) + $tokens - ), - ); - } if ($state->deleted) { $messages[] = array( 'message' => format_plural( @@ -392,18 +379,6 @@ } /** - * Find out whether to republish this entity and republish it if needed. - * - * @param FeedsState $state - * @param FeedsSource $source - * The feeds source that spawns this entity. - * @param $entity_id - * The unique id of the entity that should be loaded. - */ - protected function republishEntityIfNeeded(FeedsState $state, FeedsSource $source, $entity_id) { - } - - /** * Deletes entities which were not found on process. * * @todo batch delete? @@ -718,7 +693,6 @@ 'mappings' => array(), 'update_existing' => FEEDS_SKIP_EXISTING, 'update_non_existent' => FEEDS_SKIP_NON_EXISTENT, - 'republish_previously_non_existent' => 0, 'input_format' => NULL, 'skip_hash_check' => FALSE, 'bundle' => $bundle, @@ -940,7 +914,6 @@ $entity->feeds_item->hash = $hash; $entity->feeds_item->url = ''; $entity->feeds_item->guid = ''; - $entity->feeds_item->republish_when_exists = 0; } /** diff -u b/tests/feeds_processor_node.test b/tests/feeds_processor_node.test --- b/tests/feeds_processor_node.test +++ b/tests/feeds_processor_node.test @@ -300,14 +300,6 @@ $this->assertText('Unpublished 1 node'); $this->assertFeedItemCount(10); - // Now import a feed with the previously missing node and see if it is - // republished. - $this->setSettings('syndication_standalone', 'FeedsNodeProcessor', array('republish_previously_non_existent' => 1)); - $this->importURL('syndication_standalone', $feed_url); - $this->assertText('Republished 1 node'); - $this->assertFeedItemCount(10); - $this->setSettings('syndication_standalone', 'FeedsNodeProcessor', array('republish_previously_non_existent' => 0)); - // Now delete all items. $this->drupalPost('import/syndication_standalone/delete-items', array(), 'Delete'); $this->assertText('Deleted 10 nodes'); only in patch2: unchanged: --- a/plugins/FeedsEntityProcessor.inc +++ b/plugins/FeedsEntityProcessor.inc @@ -131,6 +131,7 @@ class FeedsEntityProcessor extends FeedsProcessor { return array( 'mappings' => array(), 'update_existing' => FEEDS_SKIP_EXISTING, + 'update_non_existent' => FEEDS_SKIP_NON_EXISTENT, 'input_format' => NULL, 'skip_hash_check' => FALSE, 'bundle' => NULL,