Index: draggableviews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/draggableviews/draggableviews.module,v
retrieving revision 1.6.2.34
diff -u -p -r1.6.2.34 draggableviews.module
--- draggableviews.module	2 Dec 2009 22:09:16 -0000	1.6.2.34
+++ draggableviews.module	29 Dec 2009 09:52:49 -0000
@@ -218,6 +218,7 @@ function draggableviews_views_pre_execut
   $view->draggableviews_info = &$info;
 
   // We want the view to execute the count query. New nodes which should be added to the very end will use this value.
+  // @todo: Deprecated: If paging is not used the count query will not be executed anyway. the $view->total_rows property is not needed anymore. It has been replaced with 999999999999.
   $view->get_total_rows = TRUE;
 
   $info['pager'] = $info['view']->pager;
@@ -250,19 +251,20 @@ function draggableviews_views_pre_execut
       // even if the user doesn't have permissions.
     }
     else {
+      // We just extend the visible window.
+      $first_index  = ($info['pager']['current_page'] * $info['pager']['items_per_page']);
+      $last_index   = $first_index + $info['pager']['items_per_page'] - 1;
+
       // When we deal with simple lists permission checks must be done right now (differently to hierarchies).
       if (user_access('Allow Reordering') && !$info['locked']) {
-        // We just extend the visible window.
-        $first_index  = ($info['pager']['current_page'] * $info['pager']['items_per_page']);
-        $last_index   = $first_index + $info['pager']['items_per_page'] - 1;
         // Add extensions.
         $first_index -= $info['view_window_extensions']['extension_top'];
         $last_index  += $info['view_window_extensions']['extension_bottom'];
         if ($first_index < 0) $first_index = 0;
-
-        $info['view']->pager['items_per_page'] = $last_index - $first_index + 1;
-        $info['view']->pager['offset']         = $first_index + $info['pager']['offset'];
       }
+
+      $info['view']->pager['items_per_page'] = $last_index - $first_index + 1;
+      $info['view']->pager['offset']         = $first_index + $info['pager']['offset'];
     }
   }
 }
