dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35119
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18022: minor fix for pager, default to 0 if invalid total
------------------------------------------------------------
revno: 18022
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-01-16 20:02:12 +0700
message:
minor fix for pager, default to 0 if invalid total
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java 2015-01-08 11:12:28 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java 2015-01-16 13:02:12 +0000
@@ -74,7 +74,7 @@
public Pager( int page, int total, int pageSize )
{
this.page = page;
- this.total = total > 0 ? total : 1;
+ this.total = total >= 0 ? total : 0;
this.pageSize = pageSize > 0 ? pageSize : 1;
if ( this.page > getPageCount() )