Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB