Welcome Guest, Not a member yet? Register   Sign In
Extra Pagination Page Number
#2

[eluser]Unknown[/eluser]
i think i found the bug!
the cause is:
{
Code:
if ($this->use_page_numbers)
  {
   $base_page = 1;
  }
}
i just add a =-1 to this if statement and it works correctly!

Code:
if ($this->use_page_numbers)
  {
   $num_pages -=1;
   $base_page = 1;
  }

AND this is a very first part of create_link function in pagination library in system->library folder that should change!

Code:
function create_links()
{
  // If our item count or per-page total is zero there is no need to continue.
  if ($this->total_rows == 0 OR $this->per_page == 0)
  {
   return '';
  }

  // Calculate the total number of pages
  $num_pages = ceil($this->total_rows / $this->per_page);

  // Is there only one page? Hm... nothing more to do here then.
  if ($num_pages == 1)
  {
   return '';
  }

  // Set the base page index for starting page number
  if ($this->use_page_numbers)
  {
   $num_pages -=1;
   $base_page = 1;
  }
  else
  {
   $base_page = 0;
  }


Messages In This Thread
Extra Pagination Page Number - by El Forum - 08-24-2012, 12:16 AM
Extra Pagination Page Number - by El Forum - 08-24-2012, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB