Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More cautious feedapi_fast import.

  • Loading branch information...
commit 58f7bcb0b438dd9f6ee38d7d5af484870e489916 1 parent a87d130
@yhahn yhahn authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 feedapi2feeds.php
View
14 feedapi2feeds.php
@@ -430,7 +430,7 @@ private function feedapi2feeds_configure_feedapi_fast($settings, $importer) {
}
/**
- * FeedAPI Node processor support for migration script
+ * FeedAPI Fast processor support for migration script
*
* Migrate items
*
@@ -440,11 +440,13 @@ private function feedapi2feeds_configure_feedapi_fast($settings, $importer) {
* Importer object
*/
private function feedapi2feeds_item_feedapi_fast($type, $importer) {
- db_query("INSERT INTO {feeds_data_" . $importer->id . "}
- (feed_nid, timestamp, title, description, url, guid)
- (SELECT fi.feed_nid, f.published, f.title, f.description, f.url, f.guid FROM feedapi_fast_item f
- LEFT JOIN feedapi_fast_item_feed fi ON f.fid = feed_item_fid
- LEFT JOIN node n ON fi.feed_nid = n.nid WHERE n.type='%s')", $type);
+ if (db_table_exists('feedapi_fast_item')) {
+ db_query("INSERT INTO {feeds_data_" . $importer->id . "}
+ (feed_nid, timestamp, title, description, url, guid)
+ (SELECT fi.feed_nid, f.published, f.title, f.description, f.url, f.guid FROM {feedapi_fast_item} f
+ LEFT JOIN {feedapi_fast_item_feed} fi ON f.fid = feed_item_fid
+ LEFT JOIN {node} n ON fi.feed_nid = n.nid WHERE n.type='%s')", $type);
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.