Browse code

reordered arguments in pagination

Brandon Mathis authored on 18/08/2011 at 18:30:36
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ module Jekyll
37 37
       dir = ((page_dir_config || page_dir) + '/').sub(/^\/+/, '')
38 38
 
39 39
       (1..pages).each do |num_page|
40
-        pager = Pager.new(site.config, num_page, all_posts, pages, page_dir+'/', '/'+dir)
40
+        pager = Pager.new(site.config, num_page, all_posts, page_dir+'/', '/'+dir, pages)
41 41
         if num_page > 1
42 42
           newpage = Page.new(site, site.source, page_dir, page.name)
43 43
           newpage.pager = pager
... ...
@@ -80,7 +80,7 @@ module Jekyll
80 80
     # all_posts - The Array of all the site's Posts.
81 81
     # num_pages - The Integer number of pages or nil if you'd like the number
82 82
     #             of pages calculated.
83
-    def initialize(config, page, all_posts, num_pages = nil, index_dir, pagination_dir)
83
+    def initialize(config, page, all_posts, index_dir, pagination_dir, num_pages = nil)
84 84
       @page = page
85 85
       @per_page = config['paginate'].to_i
86 86
       @page_dir = pagination_dir + 'page/'