• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination variables

#1
[eluser]Spiked[/eluser]
I noticed that the Pagination documentation and class itself uses strings to define the total_rows and per_page variables passed to the "Initialize" function, but the library itself converts it to integers. Nothing dangerous, just a bit "dirty".

system/libraries/Pagination.php
Code:
var $total_rows          = ''; // Total number of items (database results)
var $per_page             = 10; // Max number of items you want shown per page

.. snip ..

if ($this->total_rows == 0 OR $this->per_page == 0)

.. snip ..

$num_pages = ceil($this->total_rows / $this->per_page);

.. snip ..

if ($this->cur_page > $this->total_rows)
And more.

http://ellislab.com/codeigniter/user-gui...ation.html


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.