From de64cc96527c074c7f7fdbbde376753a32ac89cd Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Thu, 3 Dec 2009 21:27:40 +0000
Subject: [PATCH] #649552 rsoden: Provide variable for data table name.

---
 CHANGELOG.txt                  | 1 +
 README.txt                     | 9 ++++++++-
 plugins/FeedsDataProcessor.inc | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d0fe4166..fd7c307e 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,7 @@
 Feeds 6.x 1.0 xxxx, 200x-xx-xx
 ------------------------------
 
+- #649552 rsoden: Provide variable for data table name.
 - #631962 velosol, alex_b: FeedsNodeProcessor: Update when changed.
 - #623452 mongolito404: Port basic test infrastructure for mappers, test for
   basic CCK mapper.
diff --git a/README.txt b/README.txt
index 1812a1ad..8e04c5e5 100644
--- a/README.txt
+++ b/README.txt
@@ -117,10 +117,17 @@ Description: The number of feeds to import on cron time.
 
 Name:        feeds_schedule_queue_num
 Default:     200
-             The number of feeds to queue on cron time. Only has an effect if
+Description: The number of feeds to queue on cron time. Only has an effect if
              Drupal Queue is enabled.
              http://drupal.org/project/drupal_queue
 
+Name:        feeds_data_$importer_id
+Default:     feeds_data_$importer_id
+Description: The table used by FeedsDataProcessor to store feed items. Usually a
+             FeedsDataProcessor builds a table name from a prefix (feeds_data_)
+             and the importer's id ($importer_id). This default table name can
+             be overridden by defining a variable with the same name.
+
 Glossary
 ========
 
diff --git a/plugins/FeedsDataProcessor.inc b/plugins/FeedsDataProcessor.inc
index e70d3328..ac7c3d7f 100644
--- a/plugins/FeedsDataProcessor.inc
+++ b/plugins/FeedsDataProcessor.inc
@@ -269,7 +269,7 @@ class FeedsDataProcessor extends FeedsProcessor {
    * Return the data table name for this feed.
    */
   protected function tableName() {
-    return 'feeds_data_'. $this->id;
+    return variable_get('feeds_data_'. $this->id, 'feeds_data_'. $this->id);
   }
 
   /**
-- 
GitLab