<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,6 +23,11 @@ Now add a new route to your routes.rb:
 
 After that, visit /logged_exceptions in your application to manage the exceptions.
 
+Once you have done that, open up the vendor/plugins/init.rb file and choose your pagination,
+supported options are will_paginate, paginating_find, and simple mysql based pagination (Uses LIMIT)
+The current default is none. To use the other options you need to uncomment the $PAGINATION_TYPE line
+and the require for that pagination, you should comment out what you won't use etc...
+
 It's understandable that you may want to require authentication.  Add this to your config/environments/production.rb:
 
   # config/environments/production.rb
@@ -72,3 +77,4 @@ CREDITS
 Jamis Buck  - original exception_notification plugin
 Rick Olson  - model/controller code
 Josh Goebel - design
+Jason Knight - Pagination support, built on/inspired by Ryanb's willpaginate support.</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
-if Kernel.const_defined? 'WillPaginate'
-	require 'will_paginate'
-	WillPaginate.enable
-end
+	$PAGINATION_TYPE = 'none'
+	#require 'will_paginate'
+	#$PAGINATION_TYPE = 'will_paginate'
+	#WillPaginate.enable
+  #require 'paginating_find'
+	#$PAGINATION_TYPE = 'paginating_find'
 LoggedExceptionsController.view_paths = [File.join(directory, 'views')]</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,8 +31,24 @@ class LoggedExceptionsController &lt; ActionController::Base
       conditions &lt;&lt; 'controller_name = ? AND action_name = ?'
       parameters += params[:controller_actions_filter].split('/').collect(&amp;:downcase)
     end
-    @exceptions = LoggedException.paginate :order =&gt; 'created_at desc', :per_page =&gt; 30, 
+    if $PAGINATION_TYPE == 'will_paginate' then
+			@exceptions = LoggedException.paginate :order =&gt; 'created_at desc', :per_page =&gt; 30, 
       :conditions =&gt; conditions.empty? ? nil : parameters.unshift(conditions * ' and '), :page =&gt; params[:page]
+		elsif $PAGINATION_TYPE == 'paginating_find' then
+			params[:limit] ||= 25
+			params[:page] ||= 1
+			@exceptions = LoggedException.find (:all,:order =&gt; 'created_at desc',:page =&gt; {:size =&gt; params[:limit], :current =&gt; params[:page]}, 
+      :conditions =&gt; conditions.empty? ? nil : parameters.unshift(conditions * ' and '))
+		else
+			#we have no pagination so do basic sql pagination
+			params[:limit] ||= 25
+			params[:page] ||= 0
+			page = params[:page]
+			if params[:page].to_i &gt;= 1 then
+				page = params[:page].to_i * params[:limit].to_i
+			end
+			@exceptions = LoggedException.find(:all, :limit =&gt; &quot;#{page},#{params[:limit]}&quot;, :conditions =&gt; conditions.empty? ? nil : parameters.unshift(conditions * ' and '))
+		end
     
     respond_to do |format|
       format.html { redirect_to :action =&gt; 'index' unless action_name == 'index' }</diff>
      <filename>lib/logged_exceptions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,15 +4,33 @@ module LoggedExceptionsHelper
   end
 
   def pagination_remote_links(collection)
-		if Kernel.const_defined? 'WillPaginate'
-			will_paginate collection, 
+		ret = ''
+		if $PAGINATION_TYPE == 'will_paginate'
+			pagination = will_paginate (collection, 
 				:renderer   =&gt; 'LoggedExceptionsHelper::PaginationRenderer',
 				:prev_label =&gt; '',
 				:next_label =&gt; '',
-				:container  =&gt; false
+				:container  =&gt; false)
+			if collection.total_pages &gt; 1 then
+				ret = &quot;:: Pages : &lt;strong&gt;#{pagination}&lt;/strong&gt;&quot;
+			end
+		elsif $PAGINATION_TYPE == 'paginating_find' then
+			pagination = paginating_links collection
+			ret = &quot;:: Pages : &lt;strong&gt;#{pagination}&lt;/strong&gt;&quot;
+		else
+			next_page = params[:page].to_i + 1
+			prev_page = 0
+			prev_link = ''
+			if params[:page].to_i &gt; 0 then
+				prev_page = params[:page].to_i - 1
+				prev_link = &quot;&lt;a href=\&quot;?page=#{prev_page}\&quot;&gt; Previous page&lt;/a&gt;&quot;
+			end
+			next_link = &quot;&lt;a href=\&quot;?page=#{next_page}\&quot;&gt;Next page&lt;/a&gt;&quot;		
+			ret = &quot;Pagination not available#{prev_link} - #{next_link}&quot;
 		end
   end
-  if Kernel.const_defined? 'WillPaginate'
+	
+  if $PAGINATION_TYPE == 'will_paginate'
 		class PaginationRenderer &lt; WillPaginate::LinkRenderer
 			def page_link_or_span(page, span_class = 'current', text = nil)
 				text ||= page.to_s</diff>
      <filename>lib/logged_exceptions_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>22c9278e0c45806d99b367b278957dd40c606d26</id>
    </parent>
  </parents>
  <author>
    <name>Jason Knight</name>
    <email>jason@ubuntu.(none)</email>
  </author>
  <url>http://github.com/defunkt/exception_logger/commit/7172c77797e7aadc1e479985706f6a60572bdd6e</url>
  <id>7172c77797e7aadc1e479985706f6a60572bdd6e</id>
  <committed-date>2008-05-15T07:43:02-07:00</committed-date>
  <authored-date>2008-05-15T07:43:02-07:00</authored-date>
  <message>Added support for paginating find, will_paginate rewrite, and home brewed mysql pagination in case you don't have any</message>
  <tree>6531d6193577ee295e8adfa963c5ce22420569de</tree>
  <committer>
    <name>Jason Knight</name>
    <email>jason@ubuntu.(none)</email>
  </committer>
</commit>
