From f4c3d319d2d078f9211abb4330395013d7cdecb4 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 22 Jun 2010 04:37:06 +0000 Subject: [PATCH] Fixed a bug in pageouter --- Builder/IISMainHandler/build.txt | 2 +- Builder/IISUploadHandler/build.txt | 2 +- IISMainHandler/PageOuter.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 9e6181a..53c7311 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -285 \ No newline at end of file +286 \ No newline at end of file diff --git a/Builder/IISUploadHandler/build.txt b/Builder/IISUploadHandler/build.txt index 8e2afd3..25bf17f 100644 --- a/Builder/IISUploadHandler/build.txt +++ b/Builder/IISUploadHandler/build.txt @@ -1 +1 @@ -17 \ No newline at end of file +18 \ No newline at end of file diff --git a/IISMainHandler/PageOuter.cs b/IISMainHandler/PageOuter.cs index bc79f76..3aa8f31 100644 --- a/IISMainHandler/PageOuter.cs +++ b/IISMainHandler/PageOuter.cs @@ -71,7 +71,8 @@ namespace FLocal.IISHandler { pages.Add(i*this.perPage); } { - long totalFloor = this.total - (this.total % this.perPage); + long last = this.total - 1; + long totalFloor = last - (last % this.perPage); for(long i=0; i= 0) && (page <= this.total) orderby page select new XElement("page", page) + from page in pages where (page >= 0) && (page < this.total) orderby page select new XElement("page", page) )); return result; }