summaryrefslogtreecommitdiffstats
path: root/migrate.module
diff options
context:
space:
mode:
authormoshe weitzman2009-10-01 16:51:21 +0000
committermoshe weitzman2009-10-01 16:51:21 +0000
commit63748eff54fbf535e405d2e79dc471ec7e84fa82 (patch)
tree0a7514e4bf3096c83c0103d6bcdb1da9d51ecba8 /migrate.module
parentdcc2f056f530abf9e83067d8ff0c086365fe6064 (diff)
Fix drush migrate status command by moving a function from pages.inc to migrate..module
Diffstat (limited to 'migrate.module')
-rwxr-xr-xmigrate.module11
1 files changed, 11 insertions, 0 deletions
diff --git a/migrate.module b/migrate.module
index ea9accd..fff0f59 100755
--- a/migrate.module
+++ b/migrate.module
@@ -1316,3 +1316,14 @@ function _migrate_valid_date($date) {
return $time;
}
+function _migrate_get_view_count($view) {
+ if (is_string($view)) {
+ $view = views_get_view($view);
+ }
+ // Force execution of count query, with minimal unnecessary results returned
+ // @TODO: Find way to execute ONLY count query
+ $view->pager['items_per_page'] = 1;
+ $view->get_total_rows = TRUE;
+ $view->execute();
+ return $view->total_rows;
+}