CMS MADE SIMPLE FORGE

Module Generator

 

[#7953] Page limit issue

avatar
Created By: Cameron (smokeycam)
Date Submitted: Sun May 13 21:24:42 -0400 2012

Assigned To: Zdeno Kuzmany (xxl)
Version: 2.1
CMSMS Version: 1.10.3
Severity: Major
Resolution: Accepted
State: Open
Summary:
Page limit issue
Detailed Description:
Hi me again haha,

Just letting you know that on the action.default.php I had to add an ugly hack
(not sure if its the right way or not..) when setting a page limit with items
created by the module that has uneven number

For example I had a page limit of 6, but had a total of 13 items. So, it appears
that the code produced on 12 as the total result of items. So I had done this
around line 580:

// Determine the number of pages 

// Edited: had to add + 1 when its an odd number???

if ($limit % 2) { 
    $limit = $limit +1;
}

$npages = intval($count / $limit);
if ($count % $limit != 0)
    $npages++;

And that seems to of fixed the issue.

Cheers!


History

Updates

Updated: 2012-07-11 01:49
resolution_id: => 6