diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-10-02 23:54:24 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-10-02 23:54:24 +0200 |
commit | 02b0c399244435f0aeaa710b1992c75964fac88b (patch) | |
tree | bb5a9fe0f92cbf2bf094e993b60cc68c84fbc8b4 | |
parent | 0dc925f7f30c008c50f8fa801e90203b82cf0542 (diff) |
changed
if ($this->cur_page > $this->num_links)
to
if ($this->cur_page > ($this-> num_links + 1))
so the "First" link only renders when the link for page 1 is now shown
-rw-r--r-- | system/libraries/Pagination.php | 2 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 957994485..4206f4e72 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -183,7 +183,7 @@ class CI_Pagination { $output = '';
// Render the "First" link
- if ($this->cur_page > $this->num_links)
+ if ($this->cur_page > ($this->num_links + 1))
{
$output .= $this->first_tag_open.'<a href="'.$this->base_url.'">'.$this->first_link.'</a>'.$this->first_tag_close;
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index b98d9d5ba..39303bdd9 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -97,6 +97,7 @@ SVN Revision: XXXX</p> <li>Added sanitization in xss_clean() for a deprecated HTML tag that could be abused in user input in Internet Explorer.</li>
<li>Added <a href="./general/styleguide.html">PHP Style Guide</a> to docs.</li>
<li>Added backticks around column names in MySQL when using insert_string and update_string functions, and in where() function.</li>
+ <li>Modified Pagination library to only output the "First" link when the link for page one would not be shown.</li>
</ul>
</li>
</ul>
|