summaryrefslogtreecommitdiffstats
path: root/migrate.module
diff options
context:
space:
mode:
authorMike Ryan2010-07-26 01:02:41 +0000
committerMike Ryan2010-07-26 01:02:41 +0000
commitd7bff3b77bf8f7d6a947f7a0c546b364e1bdf8d9 (patch)
tree727baee2174dfa94a6e674672d7bcdbce515f147 /migrate.module
parent8e8f9c60c7dc8cafc890f30e5e91e4173c756574 (diff)
Revert #474618
Diffstat (limited to 'migrate.module')
-rwxr-xr-xmigrate.module20
1 files changed, 6 insertions, 14 deletions
diff --git a/migrate.module b/migrate.module
index 4db7158..9ebc903 100755
--- a/migrate.module
+++ b/migrate.module
@@ -712,21 +712,13 @@ function migrate_content_process_import($mcsid, &$options = array()) {
db_set_active($viewdb);
}
- // "Rebuild" build_info like $view->build() does.
- $view->build_info['query'] = $query; // = $view->query->query();
- $view->build_info['count_query'] = $view->query->query(TRUE);
- $view->build_info['query_args'] = $view->query->get_where_args();
-
//drupal_set_message($query);
timer_start('execute view query');
- $view->set_items_per_page($itemlimit);
- $view->render();
- // Rewrite query results with renderend fields.
- foreach ($view->style_plugin->rendered_fields as $row_key => $row) {
- foreach ($row as $field_key => $field) {
- $field_alias = $view->field[$field_key]->field_alias;
- $view->result[$row_key]->$field_alias = $field;
- }
+ if ($itemlimit) {
+ $importlist = db_query_range($query, $args, 0, $itemlimit);
+ }
+ else {
+ $importlist = db_query($query, $args);
}
timer_stop('execute view query');
@@ -736,7 +728,7 @@ function migrate_content_process_import($mcsid, &$options = array()) {
$imported = 0;
timer_start('db_fetch_object');
- foreach ($view->result as $row) {
+ while ($row = db_fetch_object($importlist)) {
timer_stop('db_fetch_object');
// Recheck status - permits dynamic interruption of cron jobs
$sql = "SELECT status FROM {migrate_content_sets} WHERE mcsid=%d";