- assigned_to: nobody --> crawler1
The last page error I mentioned earlier can be solved
with a change of a single line.
Change current code of get_blog_infochannel.inc.php or
get_infochannel.inc.php
Code:
(...)
// first_page , last_page link
if ($blog_count>$limit){
$sapi_obj->env["this.navigation.firstpage"] =
$baseurl;
$sapi_obj->env["this.navigation.lastpage"] =
$baseurl.'data/'.$CHANNEL.'/rowselect-'.$limit*(int)
($blog_count/$limit).'-'.$limit;
}
return $stream;
}
(...)
into this code
Code:
(...)
// first_page , last_page link
if ($blog_count>$limit){
$sapi_obj->env["this.navigation.firstpage"] =
$baseurl;
$sapi_obj->env["this.navigation.lastpage"] =
$baseurl.'data/'.$CHANNEL.'/rowselect-'.$limit*((int)
(($blog_count+$limit-1)/$limit)-1).'-'.$limit;
}
return $stream;
}
(...)
Explanation: the last_page link has to deliver as a
result the highest news item to start from,
considering the maximum of news items per page.
So, derive the integer of the total count AND the max
per page minus one. Devide it by the max per page and
than subract one.
E.g. limit = 5, blog_count=49 (expected 10 pages; 9 of
5 news items and 1 with 4 news items; last page has to
start on article 45)
this.navigation.lastpage = 5 * (int((49+5-1)/5-1)=5 *
(10-1) = 45
E.g. limit = 5, blog_count=50 (expected 10 pages of 5
news items each; last page has to start on article 45)
this.navigation.lastpage = 5 * (int((50+5-1)/5-1)=5 *
(10-1) = 45
E.g. limit = 5, blog_count=51 (expected 11 pages; 10
of 5 news items each and 1 with 1 item; last page has
to start on article 50)
this.navigation.lastpage = 5 * (int((51+5-1)/5-1)=5 *
(11-1) = 50