From 314921ef5007d59900741e55d8ce7ae57ac880d4 Mon Sep 17 00:00:00 2001 From: Tobby Hagler <thagler@phase2technology.com> Date: Thu, 8 Dec 2011 13:47:15 -0500 Subject: [PATCH] Issue #1206042 by anon: Let node titles have unique option. --- plugins/FeedsNodeProcessor.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index cac49025..b3636073 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -225,6 +225,7 @@ class FeedsNodeProcessor extends FeedsProcessor { $targets['title'] = array( 'name' => t('Title'), 'description' => t('The title of the node.'), + 'optional_unique' => TRUE, ); } $targets['nid'] = array( @@ -302,6 +303,9 @@ class FeedsNodeProcessor extends FeedsProcessor { case 'nid': $nid = db_query("SELECT nid FROM {node} WHERE nid = :nid", array(':nid' => $value))->fetchField(); break; + case 'title': + $nid = db_query("SELECT nid FROM {node} WHERE title = :title", array(':title' => $value))->fetchField(); + break; case 'feeds_source': if ($id = feeds_get_importer_id($this->config['content_type'])) { $nid = db_query("SELECT fs.feed_nid FROM {node} n JOIN {feeds_source} fs ON n.nid = fs.feed_nid WHERE fs.id = :id AND fs.source = :source", array(':id' => $id, ':source' => $value))->fetchField(); -- GitLab