summaryrefslogtreecommitdiffstats
path: root/system/libraries/Pagination.php
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
commite917f9be8b05c81357c1c2c9730d5060685d644d (patch)
treeb6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /system/libraries/Pagination.php
parent5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff)
parente1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'system/libraries/Pagination.php')
-rw-r--r--system/libraries/Pagination.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 3a0632d09..b3175f997 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -30,11 +30,11 @@ class CI_Pagination {
var $prefix = ''; // A custom prefix added to the path.
var $suffix = ''; // A custom suffix added to the path.
- var $total_rows = ''; // Total number of items (database results)
- var $per_page = 10; // Max number of items you want shown per page
+ var $total_rows = ''; // Total number of items (database results)
+ var $per_page = 10; // Max number of items you want shown per page
var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
- var $cur_page = 0; // The current page being viewed
- var $first_link = '&lsaquo; First';
+ var $cur_page = 0; // The current page being viewed
+ var $first_link = '&lsaquo; First';
var $next_link = '&gt;';
var $prev_link = '&lt;';
var $last_link = 'Last &rsaquo;';
@@ -190,7 +190,7 @@ class CI_Pagination {
$this->base_url = rtrim($this->base_url, '/') .'/';
}
- // And here we go...
+ // And here we go...
$output = '';
// Render the "First" link
@@ -204,17 +204,17 @@ class CI_Pagination {
if ($this->prev_link !== FALSE AND $this->cur_page != 1)
{
$i = $uri_page_number - $this->per_page;
-
+
if ($i == 0 && $this->first_url != '')
{
- $output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;
+ $output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;
}
else
{
$i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix;
$output .= $this->prev_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$i.'">'.$this->prev_link.'</a>'.$this->prev_tag_close;
}
-
+
}
// Render the pages
@@ -234,7 +234,7 @@ class CI_Pagination {
else
{
$n = ($i == 0) ? '' : $i;
-
+
if ($n == '' && $this->first_url != '')
{
$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href="'.$this->first_url.'">'.$loop.'</a>'.$this->num_tag_close;
@@ -242,7 +242,7 @@ class CI_Pagination {
else
{
$n = ($n == '') ? '' : $this->prefix.$n.$this->suffix;
-
+
$output .= $this->num_tag_open.'<a '.$this->anchor_class.'href="'.$this->base_url.$n.'">'.$loop.'</a>'.$this->num_tag_close;
}
}