分页类中的一个小bug
分页类126-145行if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
{
if ($CI->input->get($this->query_string_segment) != 0)
{
$this->cur_page = $CI->input->get($this->query_string_segment);
// Prep the current page - no funny business!
$this->cur_page = (int) $this->cur_page;
}
}
else
{
if ($CI->uri->segment($this->uri_segment) != 0)
{
$this->cur_page = $CI->uri->segment($this->uri_segment);
// Prep the current page - no funny business!
$this->cur_page = (int) $this->cur_page;
}
}
else 语句中 $CI->uri->segment 应该改为 $CI->uri->rsegment,否则如果使用路由重写则分页不能正确指向当前分类,
追踪这个错误花费了我一些时间 哦,:lol 这个很有键值的神贴竟然没有人顶! 508行 新版本ci框架 $this->cur_page = $this->CI->uri->rsegment($this->uri_segment);
页:
[1]