[FIX] Paging problem in memberlog

Dragonfly integration forum

[FIX] Paging problem in memberlog

Postby Karavirs » Sat Mar 03, 2007 1:08 am

Found this issue in pagination part of the memberlog file.

Starting at line 150
Code: Select all
if ($start > 0)
{
   $prev = '<a href="'.getlink($module_name.'&amp;start=0'.$sort_part).'"><<</a> <a href="'.getlink($module_name.'&amp;start='.max($start-30,0).$sort_part).'"><</a> ';
}

if (($start+30) < $max)
{
   $lastpage = ceil($max/30)*30;
   $listing = '<small>['.$start.' - '.($start+30).'] of '.$max.'</small>';
   $next = ' <a href="'.getlink($module_name.'&amp;start='.($start+30).$sort_part).'">></a> <a href="'.getlink($module_name.'&amp;start='.($lastpage-30).$sort_part).'">>></a>';
}
else
{
   $listing = ' <small>['.$start.' - '.($max).'] of '.$max.'</small>';
}


Should be
Code: Select all
if ($start > 0)
{
   $prev = '<a href="'.getlink($module_name.'&amp;file=memberlog&amp;start=0'.$sort_part).'"><<</a> <a href="'.getlink($module_name.'&amp;file=memberlog&amp;start='.max($start-30,0).$sort_part).'"><</a> ';
}

if (($start+30) < $max)
{
   $lastpage = ceil($max/30)*30;
   $listing = '<small>['.$start.' - '.($start+30).'] of '.$max.'</small>';
   $next = ' <a href="'.getlink($module_name.'&amp;file=memberlog&amp;start='.($start+30).$sort_part).'">></a> <a href="'.getlink($module_name.'&amp;file=memberlog&amp;start='.($lastpage-30).$sort_part).'">>></a>';
}
else
{
   $listing = ' <small>['.$start.' - '.($max).'] of '.$max.'</small>';
}

Last edited by Karavirs on Sat Mar 03, 2007 1:11 am, edited 1 time in total.
Image

Image
User avatar
Karavirs
WR.net Apprentice
WR.net Apprentice
 
Posts: 49
Joined: Mon Feb 26, 2007 6:33 pm
Location: Chicago

Return to Dragonfly

Who is online

Users browsing this forum: No registered users and 1 guest

cron