? .bzr
? 484600-views-disable_live_preview_1_0.patch
? 508124-fix-accept_null.patch
? 546586_0notEmpty-views2_1.patch
? 638004-views_handler_field_inc-7.patch
? 672462.views_.file-header.patch
? 673852_views_check_perm_callback.patch
? 674772.views_.profile-cats.patch
? 692970-missing-jump_menu.patch
? 698270-ease-pager-override-settings.patch
? 701588-views-add_revert_quick_link_0.patch
? 708882-style_group_docu.patch
? 713210-fix.patch
? 721358-in_operator-reduce_0.patch
? 737118_views_delete_allow_cache_clear_skipping.patch
? compare_views_block_hash.patch
? date_argument_default.patch
? getting_started.patch
? hack-views-module-2.txt
? jump_coose_text_1.patch
? shortphptags_0.patch
? ui-commas.patch
? view_taxonomy_term_edit_link.patch
? views-319991_0.patch
? views-422434-5.patch
? views-433948.patch
? views-531686-install-6.patch
? views-552498-user_mail_argument.patch
? views-640862.patch
? views-651274_1_0.patch
? views-653852.patch
? views-662654-save_query.patch
? views-672864.patch
? views-673184-2.patch
? views-738608.patch
? views-date-offset-text.patch
? views-fix-default_views_comments.patch
? views-grid-last-row.patch
? views-node_revision_link.patch
? views-query_default-docu.patch
? views-translation-fix.patch
? views.issue455364_20100307.patch
? views.menu-existing_0.patch
? views_654738-3.patch
? views_default_reset.patch
? views_docs_typo_1_0.patch
? views_handler_field_2.patch
? views_namespaced_tabs_v2.patch
? views_overrides_20100227.patch
Index: includes/view.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/includes/view.inc,v
retrieving revision 1.151.2.30
diff -u -p -r1.151.2.30 view.inc
--- includes/view.inc	12 Mar 2010 00:17:26 -0000	1.151.2.30
+++ includes/view.inc	16 Mar 2010 22:56:30 -0000
@@ -32,8 +32,10 @@ class view extends views_db_object {
   // Where the results of a query will go.
   var $result = array();
 
-  // May be used to override the current page number.
+  // May be used to override the current pager info.
   var $current_page = NULL;
+  var $items_per_page = NULL;
+  var $offset = NULL;
 
   // Places to put attached renderings:
   var $attachment_before = '';
@@ -115,10 +117,12 @@ class view extends views_db_object {
    * Set the items per page on the pager.
    */
   function set_items_per_page($items_per_page) {
-    if (empty($this->query->pager)) {
-      $this->query->init_pager($this);
+    $this->items_per_page = $items_per_page;
+
+    // If the pager is already initialized, pass it through to the pager.
+    if (!empty($this->query->pager)) {
+      $this->query->pager->set_items_per_page($items_per_page);
     }
-    $this->query->pager->set_items_per_page($items_per_page);
   }
 
   /**
@@ -131,6 +135,18 @@ class view extends views_db_object {
   }
 
   /**
+   * Set the offset on the pager.
+   */
+  function set_offset($offset) {
+    $this->offset = $offset;
+
+    // If the pager is already initialized, pass it through to the pager.
+    if (!empty($this->query->pager)) {
+      $this->query->pager->set_offset($offset);
+    }
+  }
+
+  /**
    * Whether or not AJAX should be used. If AJAX is used, paging,
    * tablesorting and exposed filters will be fetched via an AJAX call
    * rather than a page refresh.
@@ -329,6 +345,32 @@ class view extends views_db_object {
   }
 
   /**
+   * Initialize the pager
+   *
+   * Like style initialization, pager initialization is held until late
+   * to allow for overrides.
+   */
+  function init_pager() {
+    if (empty($this->query->pager)) {
+      $this->query->pager = $this->display_handler->get_plugin('pager');
+
+      if ($this->pager->use_pager()) {
+        $this->query->pager->set_current_page($view->current_page);
+      }
+
+      // These overrides may have been set earlier via $view->set_*
+      // functions.
+      if (isset($this->items_per_page)) {
+        $this->query->pager->set_items_per_page($this->items_per_page);
+      }
+
+      if (isset($this->offset)) {
+        $this->query->pager->set_offset($this->offset);
+      }
+    }
+  }
+
+  /**
    * Create a list of base tables eligible for this view. Used primarily
    * for the UI. Display must be already initialized.
    */
Index: plugins/views_plugin_query.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/Attic/views_plugin_query.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 views_plugin_query.inc
--- plugins/views_plugin_query.inc	22 Feb 2010 17:41:54 -0000	1.1.2.7
+++ plugins/views_plugin_query.inc	16 Mar 2010 22:56:30 -0000
@@ -76,14 +76,6 @@ class views_plugin_query extends views_p
     $this->offset = $offset;
   }
 
-  function init_pager(&$view) {
-    // @todo -- probably this should be a method on the display rather than directly calling
-    // get plugin?
-    if (empty($this->pager)) {
-      $this->pager = $view->display_handler->get_plugin('pager');
-    }
-  }
-
   /**
    * Render the pager, if necessary.
    */
Index: plugins/views_plugin_query_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/Attic/views_plugin_query_default.inc,v
retrieving revision 1.1.2.21
diff -u -p -r1.1.2.21 views_plugin_query_default.inc
--- plugins/views_plugin_query_default.inc	12 Mar 2010 01:02:45 -0000	1.1.2.21
+++ plugins/views_plugin_query_default.inc	16 Mar 2010 22:56:31 -0000
@@ -1031,10 +1031,7 @@ class views_plugin_query_default extends
    * Builds the necessary info to execute the query.
    */
   function build(&$view) {
-    $this->init_pager($view);
-    if ($this->pager->use_pager()) {
-      $this->pager->set_current_page($view->current_page);
-    }
+    $view->init_pager($view);
 
     // Let the pager modify the query to add limits.
     $this->pager->query();
